-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
135 lines (104 loc) · 3.56 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
.PHONY: bun_create_migrations \
docker_build \
docker_sh \
docker_compose \
docker_compose_query_populate \
docker_compose_query \
docker_compose_indexer \
indexer \
indexer_debug_events \
query \
query_nodemon \
query_populate_mode \
query_no_cache \
query_test_health_handler \
query_test_lavap_provider_error_parsing \
redis_run \
redis_restart \
redis_connect \
macos_psql_start \
macos_query_port_pid \
query_endpoints_full_tests_all
bun_create_migrations:
bun run generate
bun_build:
bun run build --verbose
bun_clean_cache:
bun pm cache rm
docker_build:
docker build --progress=plain -t bun-docker .
docker_sh:
docker run --privileged -it bun-docker /bin/sh
docker_compose:
docker-compose -f docker-compose.yml up
docker_compose_query_populate:
docker-compose up query_populate
docker_compose_query:
docker-compose up query
docker_compose_indexer:
docker-compose up indexer
indexer:
IS_INDEXER_PROCESS=true NODE_TLS_REJECT_UNAUTHORIZED=0 bun run src/indexer.ts
indexer_with_migrations:
JSINFO_INDEXER_RUN_MIGRATIONS=true NODE_TLS_REJECT_UNAUTHORIZED=0 bun run src/indexer.ts
indexer_with_debugger:
NODE_TLS_REJECT_UNAUTHORIZED=0 bun --inspect-brk run src/indexer.ts
query:
npx --yes nodemon --watch src --ext ts --exec "JSINFO_QUERY_IS_DEBUG_MODE=true bun run src/query.ts"
query_no_nodemon:
JSINFO_QUERY_IS_DEBUG_MODE=true bun run src/query.ts
query_inspect:
NODE_ENV=development JSINFO_QUERY_MEMORY_DEBUG_MODE=true JSINFO_QUERY_IS_DEBUG_MODE=true bun --inspect run src/query.ts --expose-gc
query_memory_debug:
JSINFO_QUERY_CLASS_MEMORY_DEBUG_MODE=true JSINFO_QUERY_MEMORY_DEBUG_MODE=true make query
query_port8090:
JSINFO_QUERY_PORT=8090 make query
query_test_lavap_prodiver_error_parsing:
bun run ./src/query/utils/lavapProvidersErrorParser.test.ts
redis_run:
docker rm -f redis-stack || true
docker run --name redis-stack -p 6379:6379 -p 8001:8001 -e REDIS_ARGS="--requirepass mypassword" redis/redis-stack:latest
redis_connect:
docker exec -it redis-stack redis-cli -a mypassword
macos_psql_start:
@echo "Checking if PostgreSQL@14 is installed..."
@if ! brew list postgresql@14 &>/dev/null; then \
echo "Installing PostgreSQL@14..."; \
brew install postgresql@14; \
else \
echo "PostgreSQL@14 is already installed."; \
fi
@echo "Stopping any running PostgreSQL services..."
-brew services stop postgresql@16
@echo "Starting PostgreSQL@14 service..."
brew services start postgresql@14
@echo "Listing all services..."
brew services list
macos_kill_query_port:
@echo "Querying PID for the process on port 8081..."
@PID=$$(lsof -ti tcp:8081); \
if [ -n "$$PID" ]; then \
echo "Killing process $$PID..."; \
kill $$PID; \
echo "Process $$PID has been terminated."; \
else \
echo "No process found listening on port 8081."; \
fi
query_endpoints_full_tests_all:
cd tests/query_endpoints && make query_endpoints_full_tests_all
query_endpoints_full_tests_local:
cd tests/query_endpoints && make query_endpoints_full_tests_local
query_endpoints_full_tests_staging:
cd tests/query_endpoints && make query_endpoints_full_tests_staging
query_endpoints_full_tests_testnet:
cd tests/query_endpoints && make query_endpoints_full_tests_testnet
query_endpoints_full_tests_mainnet:
cd tests/query_endpoints && make query_endpoints_full_tests_mainnet
executils_getblock:
JSINFO_QUERY_IS_DEBUG_MODE=true bun run src/executils/getblock.ts 1629704
executils_analyze_heap:
bun run ./src/executils/analyze-heap.ts
executils_test_rpc:
bun run ./src/executils/test-rpc.ts
executils_event_debug:
bun run ./src/executils/event-debug.ts