Skip to content

Commit aa0e51e

Browse files
zone117xrafaelcr
andcommitted
feat!: refactor from Express to Fastify
* feat: route splitting between express and fastify * feat: refactor `/extended/v1/tx/*` endpoints to fastify * feat: refactor `/extended/v1/stx_supply/*` endpoints to fastify * feat: refactor `/extended/v1/info/*` endpoints to fastify * feat: refactor `/extended/v1/tokens/*` endpoints to fastify * feat: refactor `/extended/v1/tokens/*` endpoints to fastify * feat: refactor `/extended/v1/contract/*` endpoints to fastify * feat: refactor `/extended/v1/fee_rate/*` endpoints to fastify * feat: refactor `/extended/v1/microblock/*` endpoints to fastify * feat: refactor `/extended/v1/block/*` endpoints to fastify * feat: refactor `/extended/v1/burnchain/*` endpoints to fastify * feat: refactor `/extended/v1/address/*` endpoints to fastify * feat: refactor `/extended/v1/search/*` endpoints to fastify * feat: refactor `/extended/v1/pox*` endpoints to fastify * feat: refactor `/extended/v1/faucets/*` endpoints to fastify * feat: refactor `/extended/v1/debug/*` endpoints to fastify * feat: refactor `/extended/v2/blocks/*` and `/extended/v2/burn-blocks/*` endpoints to fastify * feat: refactor `/extended/v2/smart-contracts/*` endpoints to fastify * feat: refactor `/extended/v2/mempool/*` endpoints to fastify * feat: refactor `/extended/v2/pox/*` endpoints to fastify * feat: refactor `/extended/v2/addresses/*` endpoints to fastify * feat: refactor `/v1/names/*` endpoints to fastify * feat: refactor `/v1/namespaces/*` endpoints to fastify * feat: refactor `/v1/addresses/*` endpoints to fastify * feat: refactor `/v2/prices/*` endpoints to fastify * feat: refactor core-node RPC proxy (/v2/*) to fastify * chore: remove dead code * feat: openAPI spec generation from fastify routes * chore: remove references to legacy generated types * docs: missing openapi tag on burn-blocks route * docs: update docs and client generation scripts * fix: several query params should be optional * fix: only use a GET route for extended status * chore: simpify typing for TransactionSchema and MempoolTransactionSchema * feat: refactor client library * chore: remove dependencies on old generated types * chore: isolate rosetta json schemas and delete the rest * chore: cleanup prometheus metrics * fix: misc tests * test: misc rosetta fixes * fix: batch insert length assertion (#2042) * fix: batch insert length assertion * build: upgrade docker-compose * build: use docker compose * test: misc bns test fixes * test: misc pox fixes * ci: misc fixes * chore: fix unused exports lint * chore: simplify docs and client package.json scripts * feat: refactor event-server from express to fastify * chore: expose more helper types in the client lib --------- Co-authored-by: Rafael Cárdenas <rafael@rafaelcr.com>
1 parent f6e50f6 commit aa0e51e

File tree

701 files changed

+272942
-71170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

701 files changed

+272942
-71170
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ src/tests-bns/
1616
client/src/
1717
config/
1818
utils/src/
19+
client*

.github/workflows/ci.yml

-116
Original file line numberDiff line numberDiff line change
@@ -52,56 +52,6 @@ jobs:
5252
- name: Lint Unused Exports
5353
run: npm run lint:unused-exports
5454

55-
lint-docs:
56-
runs-on: ubuntu-latest
57-
defaults:
58-
run:
59-
working-directory: ./docs
60-
steps:
61-
- uses: actions/checkout@v3
62-
with:
63-
fetch-depth: 0
64-
65-
- name: Use Node.js
66-
uses: actions/setup-node@v4
67-
with:
68-
node-version-file: ".nvmrc"
69-
70-
- name: Cache node modules
71-
uses: actions/cache@v3
72-
env:
73-
cache-name: cache-node-modules
74-
with:
75-
path: |
76-
~/.npm
77-
**/node_modules
78-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
79-
restore-keys: |
80-
${{ runner.os }}-build-${{ env.cache-name }}-
81-
${{ runner.os }}-build-
82-
${{ runner.os }}-
83-
84-
- name: Install deps
85-
run: npm ci --audit=false
86-
87-
- name: Build schema & docs
88-
run: npm run build
89-
90-
- name: Validate generated types
91-
run: tsc index.d.ts
92-
93-
- name: Lint JSON
94-
run: npm run lint:json
95-
96-
- name: Lint YAML
97-
run: npm run lint:yaml
98-
99-
- name: Lint OpenAPI
100-
run: npm run lint:openapi
101-
102-
- name: Validate schemas
103-
run: npm run validate:schemas
104-
10555
test:
10656
runs-on: ubuntu-latest
10757
steps:
@@ -133,10 +83,6 @@ jobs:
13383
working-directory: client
13484
run: npm ci --audit=false
13585

136-
- name: Install docs deps
137-
working-directory: docs
138-
run: npm ci --audit=false
139-
14086
- name: Setup env vars
14187
run: echo "STACKS_CORE_EVENT_HOST=http://0.0.0.0" >> $GITHUB_ENV
14288

@@ -412,68 +358,6 @@ jobs:
412358
flag-name: run-${{ github.job }}
413359
parallel: true
414360

415-
test-subnets:
416-
if: false
417-
runs-on: ubuntu-latest
418-
steps:
419-
- uses: actions/checkout@v3
420-
421-
- name: Use Node.js
422-
uses: actions/setup-node@v4
423-
with:
424-
node-version-file: '.nvmrc'
425-
426-
- name: Cache node modules
427-
uses: actions/cache@v3
428-
env:
429-
cache-name: cache-node-modules
430-
with:
431-
path: |
432-
~/.npm
433-
**/node_modules
434-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
435-
restore-keys: |
436-
${{ runner.os }}-build-${{ env.cache-name }}-
437-
${{ runner.os }}-build-
438-
${{ runner.os }}-
439-
440-
- name: Install deps
441-
run: npm ci --audit=false
442-
443-
- name: Setup env vars
444-
run: echo "STACKS_CORE_EVENT_HOST=http://0.0.0.0" >> $GITHUB_ENV
445-
446-
- name: Setup integration environment
447-
run: |
448-
sudo ufw disable
449-
npm run devenv:deploy:subnets -- -d
450-
npm run devenv:logs:subnets -- --no-color &> docker-compose-logs.txt &
451-
452-
- name: Run tests
453-
run: npm run test:subnets
454-
455-
- name: Print integration environment logs
456-
run: cat docker-compose-logs.txt
457-
if: failure()
458-
459-
- name: Teardown integration environment
460-
run: npm run devenv:stop:subnets
461-
if: always()
462-
463-
- name: Upload coverage to Codecov
464-
uses: codecov/codecov-action@v4
465-
with:
466-
token: ${{ secrets.CODECOV_TOKEN }}
467-
if: always()
468-
469-
- name: Upload coverage to Coveralls
470-
uses: coverallsapp/github-action@master
471-
if: always()
472-
with:
473-
github-token: ${{ secrets.github_token }}
474-
flag-name: run-${{ github.job }}
475-
parallel: true
476-
477361
test-bns-e2e:
478362
runs-on: ubuntu-latest
479363
steps:

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ src/tests-rosetta/
44
src/tests-rosetta-cli/
55
src/tests-bns/
66
src/tests/synthetic-tx-payloads/
7+
src/rosetta/json-schemas/

.proxy-cache-control.json

-11
This file was deleted.

.releaserc

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
[
2929
"@semantic-release/exec",
3030
{
31-
"execCwd": "client",
3231
"prepareCmd": "npm ci"
3332
}
3433
],
3534
[
36-
"@semantic-release/npm",
35+
"@semantic-release/exec",
3736
{
38-
"pkgRoot": "./docs"
37+
"execCwd": "client",
38+
"prepareCmd": "npm ci"
3939
}
4040
],
4141
[

.vscode/launch.json

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"args": ["${workspaceFolder}/src/index.ts"],
2323
"outputCapture": "std",
2424
"internalConsoleOptions": "openOnSessionStart",
25-
"preLaunchTask": "generate:schemas",
2625
"env": {
2726
"NODE_ENV": "development",
2827
"TS_NODE_SKIP_IGNORE": "true"

.vscode/tasks.json

-8
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@
33
// for the documentation about the tasks.json format
44
"version": "2.0.0",
55
"tasks": [
6-
{
7-
"label": "generate:schemas",
8-
"type": "npm",
9-
"script": "generate:schemas",
10-
"presentation": {
11-
"reveal": "silent"
12-
}
13-
},
146
{
157
"label": "stacks-node:deploy-dev",
168
"type": "shell",

client/.eslintrc.js

-19
This file was deleted.

client/openapitools.json

-7
This file was deleted.

0 commit comments

Comments
 (0)