-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c98760a
commit 685c0e5
Showing
24 changed files
with
7,219 additions
and
2,281 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 was deleted.
Oops, something went wrong.
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,41 @@ | ||
name: Base | ||
description: Install node, pnpm and setup cache | ||
|
||
inputs: | ||
token: | ||
description: NPM token | ||
required: true | ||
default: null | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
with: | ||
run_install: false | ||
|
||
- name: Expose pnpm config through "$GITHUB_OUTPUT" | ||
id: pnpm-config | ||
shell: bash | ||
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache rotation keys | ||
id: cache-rotation | ||
shell: bash | ||
run: echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT | ||
|
||
- name: Setup pnpm cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.pnpm-config.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}- | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile --prefer-offline | ||
shell: bash |
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,26 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
check: | ||
uses: ./.github/workflows/check.yml | ||
secrets: inherit | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: [check] | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: ./.github/actions/base | ||
|
||
- run: npm publish | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,4 +1,13 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
result=$(pnpm cspell --show-context --no-progress --no-summary "$1" | sed 's/.* - / ➜ /' 2>&1 || true) | ||
if ! [ -z "$result" ]; then | ||
echo "✗ Commit message didn't pass spellcheck:" | ||
echo "$result" | ||
exit 1 | ||
fi | ||
|
||
|
||
pnpm commitlint --edit "$1" |
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,4 +1,7 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
exec git diff --cached --name-only | pnpm cspell --show-suggestions --show-context --no-progress --no-must-find-files --file-list stdin | ||
|
||
pnpm lint-staged |
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,5 @@ | ||
export default { | ||
'*': 'prettier --ignore-unknown --write', | ||
'*.ts': 'eslint --fix', | ||
'*.md': 'markdownlint --fix', | ||
} |
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,9 @@ | ||
{ | ||
"default": true, | ||
"MD033": { | ||
"allowed_elements": ["table"] | ||
}, | ||
"MD013": { | ||
"line_length": 1000 | ||
} | ||
} |
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,7 @@ | ||
strict-peer-dependencies=false | ||
auto-install-peers=false | ||
use-lockfile-v6=true | ||
resolution-mode=highest | ||
dedupe-direct-deps=false | ||
save-prefix='' | ||
save-workspace-protocol=rolling |
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,10 @@ | ||
export default { | ||
printWidth: 80, | ||
useTabs: false, | ||
tabWidth: 2, | ||
semi: false, | ||
singleQuote: true, | ||
trailingComma: 'es5', | ||
arrowParens: 'always', | ||
plugins: ['prettier-plugin-packagejson'], | ||
} |
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 @@ | ||
export default { | ||
extends: ['@commitlint/config-conventional'], | ||
} |
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,16 @@ | ||
{ | ||
"dictionaries": ["node", "npm", "en-gb"], | ||
"ignorePaths": ["node_modules", "build", "dist", "pnpm-lock.yaml"], | ||
"language": "en", | ||
"words": [ | ||
"Afanassieff", | ||
"Cashin", | ||
"commitlint", | ||
"Knip", | ||
"lintstagedrc", | ||
"lnmarkets", | ||
"packagejson", | ||
"sats", | ||
"undici" | ||
] | ||
} |
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,12 @@ | ||
import { createRestClient } from '../src/index.js' | ||
import console from 'node:console' | ||
|
||
const client = createRestClient({ network: 'testnet' }) | ||
|
||
const ticker = await client.futuresGetTicker() | ||
|
||
console.log(ticker) | ||
|
||
const user = await client.userGet() | ||
|
||
console.log(user) |
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,21 @@ | ||
import type { KnipConfig } from 'knip' | ||
|
||
export default { | ||
ignoreExportsUsedInFile: true, | ||
ignore: ['./example/**'], | ||
ignoreDependencies: [ | ||
'eslint-import-resolver-typescript', | ||
'lint-staged', | ||
'@commitlint/cli', | ||
], | ||
ignoreBinaries: [], | ||
typescript: { config: ['tsconfig.*.json'] }, | ||
prettier: { config: ['.prettierrc.js'] }, | ||
eslint: { config: ['.eslintrc.cjs'] }, | ||
'lint-staged': { config: ['.lintstagedrc.js'] }, | ||
commitlint: { config: ['commitlint.config.js'] }, | ||
'github-actions': { | ||
config: ['.github/workflows/*.yml', '.github/actions/**/*.yml'], | ||
}, | ||
cspell: { config: ['cspell.json'] }, | ||
} satisfies KnipConfig |
Oops, something went wrong.