forked from ubiquity/rpc-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: web3 rpc handler npm package * feat: web3 rpc handler npm package * chore: configurable, add kebab, remove dist * chore: readme * chore: add workflow scripts * chore: remove build workflow * Delete .github/workflows/scripts/kebabalize.sh This is destructive and renames files so lets not use it. * chore: improved race, tests and readme, removed ubq rpcs * chore: script permission * chore: type the constants remove bad else * fix: type out path to src * chore: type the promises, add ts config and jest workflow * chore: final touch ups * chore: export all from index * fix: readme * Update package.json * Update README.md --------- Co-authored-by: Keyrxng <[email protected]> Co-authored-by: アレクサンダー.eth <[email protected]>
- Loading branch information
1 parent
3ef38df
commit 0d964b0
Showing
39 changed files
with
3,813 additions
and
289 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-env", "@babel/preset-typescript"] | ||
} |
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", | ||
"version": "0.2", | ||
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log"], | ||
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "lib", "dist"], | ||
"useGitignore": true, | ||
"language": "en", | ||
"words": ["dataurl", "devpool", "outdir", "servedir"], | ||
"dictionaries": ["typescript", "node", "software-terms"], | ||
"import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"], | ||
"ignoreRegExpList": ["[0-9a-fA-F]{6}"] | ||
"ignoreRegExpList": ["[0-9a-fA-F]{6}"], | ||
"ignoreWords": ["Rpcs", "ethersproject", "publicnode", "WXDAI", "XDAI", "chainlist", "Knip"] | ||
} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,33 @@ | ||
name: Run Jest testing suite | ||
on: | ||
workflow_dispatch: | ||
pull_request_target: | ||
types: [opened, synchronize] | ||
|
||
env: | ||
NODE_ENV: "test" | ||
|
||
jobs: | ||
testing: | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.10.0" | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- name: Build & Run test suite | ||
run: | | ||
yarn && yarn build | ||
yarn test | tee ./coverage.txt && exit ${PIPESTATUS[0]} | ||
- name: Jest Coverage Comment | ||
# Ensures this step is run even on previous step failure (e.g. test failed) | ||
if: always() | ||
uses: MishaKav/jest-coverage-comment@main | ||
with: | ||
coverage-summary-path: coverage/coverage-summary.json | ||
junitxml-path: junit.xml | ||
junitxml-title: JUnit | ||
coverage-path: ./coverage.txt |
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,15 @@ | ||
name: Enforce kebab-case | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
check-filenames: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check For Non Kebab-Cased TypeScript Files | ||
run: .github/workflows/scripts/kebab-case.sh |
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,30 @@ | ||
#!/bin/bash | ||
non_compliant_files=() | ||
ignoreList=("^\.\/.git" "^\.\/\..*" "^\.\/[^\/]*$") | ||
ignoreList+=("^\.\/node_modules") | ||
while IFS= read -r line; do | ||
ignoreList+=(".*$line") | ||
done < .gitignore | ||
while read -r file; do | ||
basefile=$(basename "$file") | ||
ignoreFile=false | ||
for pattern in "${ignoreList[@]}"; do | ||
if [[ "$file" =~ $pattern ]]; then | ||
ignoreFile=true | ||
break | ||
fi | ||
done | ||
if $ignoreFile; then | ||
continue | ||
elif ! echo "$basefile" | grep -q -E "^([a-z0-9]+-)*[a-z0-9]+(\.[a-zA-Z0-9]+)?$|^([a-z0-9]+_)*[a-z0-9]+(\.[a-zA-Z0-9]+)?$"; then | ||
non_compliant_files+=("$file") | ||
echo "::warning file=$file::This file is not in kebab-case or snake_case" | ||
fi | ||
done < <(find . -type f -name '*.ts' -print | grep -E '/[a-z]+[a-zA-Z]*\.ts$') | ||
if [ ${#non_compliant_files[@]} -ne 0 ]; then | ||
echo "The following files are not in kebab-case or snake_case:" | ||
for file in "${non_compliant_files[@]}"; do | ||
echo " - $file" | ||
done | ||
exit 1 | ||
fi |
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 |
---|---|---|
|
@@ -7,4 +7,7 @@ node_modules | |
.pnp.cjs | ||
.pnp.loader.mjs | ||
.env | ||
static/dist | ||
dist | ||
|
||
coverage | ||
junit.xml |
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,3 @@ | ||
[submodule "lib/chainlist"] | ||
path = lib/chainlist | ||
url = https://github.com/DefiLlama/chainlist.git |
Oops, something went wrong.