-
Notifications
You must be signed in to change notification settings - Fork 4
switch from lite-api to api.jup.ag with API key auth #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
odilitime
wants to merge
38
commits into
1.x
Choose a base branch
from
odi-dev
base: 1.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
c81e5eb
switch from lite-api to api.jup.ag with API key auth
odilitime 5e6e90e
fix dev script to use tsup --watch instead of build.ts
odilitime 345694b
fix getTokenPair and getHistoricalPrices to use real Jupiter endpoints
odilitime b1d3cca
refuse to start Jupiter service without JUPITER_API_KEY
odilitime 39e6d9e
fix getTokenPrice decimal bug and cache key mismatch
odilitime 15a2f0d
add TTL + size cap to routeCache, defer queue timers to start()
odilitime c363fe3
service.ts: fix appropriate node
6a39d05
service.ts: fix any call
b340047
service.ts: fix in cursor
eb9b8f7
service.ts: fix in cursor
3a92fa5
service.ts: improve error handling
e5f1783
service.ts: fix in cursor
5e307f3
service.ts: fix in cursor
3d612d1
docs: add review dismissal comments
b96c223
service.ts: fix the method
cc89e9a
service.ts: fix in cursor
8c5ad9e
docs: add review dismissal comments
d092fc7
service.ts: fix in cursor
6e91857
service.ts: simplify implementation
8d2c795
docs: add review dismissal comments
e2cc8a7
service.ts: fix in cursor
0420f53
docs: add review dismissal comments
a2afcae
service.ts: simplify implementation
7acad24
service.ts: fix in cursor
odilitime 6635c26
service.ts: simplify implementation
odilitime a165741
service.ts: simplify implementation
odilitime 23f355b
service.ts: simplify implementation
odilitime 0b483bc
service.ts: simplify implementation
odilitime e0faefd
service.ts: simplify implementation
odilitime 13c0efc
service.ts: simplify implementation
odilitime 5c48223
service.ts: simplify implementation
odilitime 9165b3b
service.ts: simplify implementation
odilitime 34afa9f
service.ts: simplify implementation
odilitime dd69ab0
service.ts: simplify implementation
odilitime 3d87234
service.ts: remove duplicate code
odilitime c5e0291
service.ts: fix if you
odilitime 72918ae
service.ts: remove duplicate code
odilitime b981558
service.ts: fix in cursor
odilitime File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,44 @@ | ||
| # Dependencies | ||
| node_modules | ||
|
|
||
| # Build outputs | ||
| dist | ||
| node_modules | ||
| build | ||
| *.tsbuildinfo | ||
| .turbo | ||
| .turbo-tsconfig.json | ||
|
|
||
| # Environment files | ||
| .env | ||
| .env.local | ||
| .env.production | ||
| .env.bak | ||
|
|
||
| # IDE | ||
| .idea | ||
| .vscode | ||
| .zed | ||
| .DS_Store | ||
|
|
||
| # Test coverage | ||
| coverage | ||
| .nyc_output | ||
|
|
||
| # Logs | ||
| *.log | ||
| logs | ||
|
|
||
| # Cache | ||
| cache | ||
| .cache | ||
| tokencache | ||
|
|
||
| # Temporary files | ||
| *.tmp | ||
| *.temp | ||
| .tmp | ||
|
|
||
| # Bundler artifacts | ||
| tsup.config.bundled_*.mjs | ||
| # prr state file (auto-generated) | ||
| .pr-resolver-state.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| #!/usr/bin/env bun | ||
| import { $ } from "bun"; | ||
|
|
||
| async function build() { | ||
| const totalStart = Date.now(); | ||
| const pkg = await Bun.file("package.json").json(); | ||
| const externalDeps = [ | ||
| ...Object.keys(pkg.dependencies ?? {}), | ||
| ...Object.keys(pkg.peerDependencies ?? {}), | ||
| ]; | ||
|
|
||
| // Use the clean script from package.json | ||
| if (pkg.scripts?.clean) { | ||
| console.log("🧹 Cleaning..."); | ||
| await $`bun run clean`.quiet(); | ||
| } | ||
|
|
||
| const esmStart = Date.now(); | ||
| console.log("🔨 Building @elizaos/plugin-jupiter..."); | ||
| const esmResult = await Bun.build({ | ||
| entrypoints: ["src/index.ts"], | ||
| outdir: "dist", | ||
| target: "node", | ||
| format: "esm", | ||
| sourcemap: "external", | ||
| minify: false, | ||
| external: externalDeps, | ||
| }); | ||
| if (!esmResult.success) { | ||
| console.error(esmResult.logs); | ||
| throw new Error("ESM build failed"); | ||
| } | ||
| console.log(`✅ Build complete in ${((Date.now() - esmStart) / 1000).toFixed(2)}s`); | ||
|
|
||
| const dtsStart = Date.now(); | ||
| console.log("📝 Generating TypeScript declarations..."); | ||
| await $`tsc --project tsconfig.build.json`; | ||
| console.log(`✅ Declarations generated in ${((Date.now() - dtsStart) / 1000).toFixed(2)}s`); | ||
|
|
||
| console.log(`🎉 All builds finished in ${((Date.now() - totalStart) / 1000).toFixed(2)}s`); | ||
| } | ||
|
|
||
| build().catch((err) => { | ||
| console.error("Build failed:", err); | ||
| process.exit(1); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
devrunsbun run build.ts --watch, but build.ts never reads CLI args and doesn’t enable any watch mode forBun.build. As-is,--watchis ignored and dev mode will just run a single build and exit.