-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Race top n nodes when making requests (#25)
* feat: implement a nodes list for clients * feat: implement a storage interface using indexedDb * feat: implement a test suite for fallback * fix: remove unused code * fix: eslint an jsdoc * fix: formatting and consistency * fix: indexDbCheck * chore: change storage implementation * enhancement: simplify node loading * naive fallback implementation * modify fallback * fix formatting and typos * typos * Update .eslintrc Co-authored-by: Diego Rodríguez Baquero <[email protected]> * enhancement: edit storage impl * enhancement: deal with overlapping byte chunks * feat: add fallback test suite * fix: tests running * cleanup content fetch with fallback * add initial origin fetch to fallback * formatting and file re-org * feat: merge main into fallback branch (#22) * Abort on error (#19) * feat: use controller from options if exists. abort fetch if error occurs. * test: check if external abort controller is used * build: move build output to dist/ folder * fix: newline * 0.1.1 * Build exports (#20) * chore: rename file * feat: add new entrypoint with exports. Switch Saturn to named export * build: expose entire module instead of just the default export * docs: update README * 0.2.0 * feat: include worker scopes when checking for browser runtime (#21) * 0.3.0 --------- Co-authored-by: Eric Guan <[email protected]> * load nodes on first success * add fallback limit * fix: fallback bug * put eslint settings in package.json * add nodesListKey as static * fix: resolve process in browser * feat: add fetching with a race * enhancement: add backward compatibility for racing * tests and cleanup * fixes and enhancements * add typings * add typings --------- Co-authored-by: Diego Rodríguez Baquero <[email protected]> Co-authored-by: Eric Guan <[email protected]>
- Loading branch information
1 parent
5ef32b0
commit 3b4e8db
Showing
4 changed files
with
235 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,14 @@ | ||
|
||
/** | ||
* @module types */ | ||
|
||
/** | ||
* | ||
* @typedef {object} Node | ||
* @property {string} ip | ||
* @property {number} weight | ||
* @property {number} distance | ||
* @property {string} url | ||
*/ | ||
|
||
export {} |
This file contains 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
This file contains 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