-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
100 lines (100 loc) · 6.86 KB
/
package.json
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
{
"name": "api3-tracker",
"version": "0.1.0",
"node": ">=20",
"license": "MIT",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"db:init": "docker rm -f pgapi3dao; docker run --name pgapi3dao -e POSTGRES_DB=api3dao -e POSTGRES_PASSWORD=test -d -p5432:5432 postgres -c maintenance_work_mem=1GB && docker exec -it pgapi3dao bash -c 'until pg_isready; do sleep 1; done;' && yarn prisma migrate dev",
"db:restore": "docker rm -f pgapi3dao; docker run --name pgapi3dao -e POSTGRES_DB=api3dao -e POSTGRES_PASSWORD=test -d -p5432:5432 postgres -c maintenance_work_mem=1GB && docker exec -it pgapi3dao bash -c 'until pg_isready; do sleep 1; done;' && (cat pgapi3dao.sql.gz | gzip -d - | docker exec -i pgapi3dao psql -U postgres -h 127.0.0.1 -d api3dao)",
"db:shell": "docker exec -it pgapi3dao psql -U postgres -h 127.0.0.1 api3dao",
"db:status": "docker exec -it pgapi3dao psql -U postgres -h 127.0.0.1 api3dao -c 'select * from sync_status order by id'",
"db:rm": "docker rm -f pgapi3dao",
"db:fresh": "aws s3 cp --profile s3_backup s3://api3-dao-tracker-backups/tracker/$(aws s3 ls --profile s3_backup s3://api3-dao-tracker-backups/tracker/ | tail -n 1 | cut -f5 -d' ') ./pgapi3dao.sql.gz",
"db:dump": "(docker exec -i pgapi3dao pg_dump --no-owner --format plain --clean --if-exists -U postgres -h 127.0.0.1 api3dao > pgapi3dao.sql) && find . -name pgapi3dao.sql.gz -delete && gzip pgapi3dao.sql",
"db:upload": "cat pgapi3dao.sql.gz | gzip -d - | docker exec -i $(docker ps -q --filter label=role=postgres --filter label=project=api3tracker) sh -c 'psql -U $POSTGRES_USER -d $POSTGRES_DB -h 127.0.0.1'",
"cache:dump": "(docker exec -i pgapi3dao pg_dump --no-owner --format plain --clean --if-exists --table sync_status --table cache_votings --table cache_blocks --table cache_ens --table cache_user_shares --table cache_total_shares --table cache_logs --table cache_receipts --table cache_tx -U postgres -h 127.0.0.1 api3dao > cache.sql) && (echo '\nUPDATE public.sync_status SET processed = 0;\n ' >> cache.sql) && find . -name cache.sql.gz -delete && gzip cache.sql",
"cache:restore": "cat cache.sql.gz | gzip -d - | docker exec -i pgapi3dao psql -U postgres -h 127.0.0.1 -d api3dao",
"lint:fix": "yarn format",
"format": "prettier --write \"./**/*.{ts,tsx,js,jsx,css,scss,md,json,prisma}\" --loglevel silent",
"format:check": "prettier --check \"./**/*.{ts,tsx,js,jsx,css,scss,md,json,prisma}\" --loglevel debug",
"state:reset": "TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts state reset",
"state:next": "API3TRACKER_ENDPOINT=${API3TRACKER_ENDPOINT:-`chainstate --endpoints -t alchemy,mainnet`} TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts state next",
"state:update": "API3TRACKER_ENDPOINT=${API3TRACKER_ENDPOINT:-`chainstate --endpoints -t alchemy,mainnet`} TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts state update",
"state:unlogged": "docker exec -i pgapi3dao psql -U postgres -h 127.0.0.1 -d api3dao -c 'ALTER TABLE \"member_delegations\" SET UNLOGGED; ALTER TABLE \"member_events\" SET UNLOGGED; ALTER TABLE \"member_epochs\" SET UNLOGGED; ALTER TABLE \"voting_event\" SET UNLOGGED; ALTER TABLE \"voting\" SET UNLOGGED; ALTER TABLE \"members\" SET UNLOGGED; ALTER TABLE \"epochs\" SET UNLOGGED';",
"ens:reset": "TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts ens reset",
"ens:import": "TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts ens import",
"ens:download": "API3TRACKER_ENDPOINT=${API3TRACKER_ENDPOINT:-`chainstate --endpoints -t alchemy,mainnet`} TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts ens download",
"lint:eslint": "eslint --report-unused-disable-directives --ext .ts,.tsx --max-warnings 0 .",
"lint:next": "next lint",
"lint:prettier": "prettier --check \"./**/*.{ts,js,md,json}\"",
"lint:tsc": "tsc --build .",
"lint": "yarn run lint:eslint && yarn run lint:next && yarn run lint:prettier && yarn run lint:tsc",
"logs:reset": "TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts logs reset",
"logs:download": "API3TRACKER_ENDPOINT=${API3TRACKER_ENDPOINT:-`chainstate --endpoints -t alchemy,mainnet`} TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts logs download",
"shares:reset": "TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts shares reset",
"shares:download": "API3TRACKER_ENDPOINT=${API3TRACKER_ENDPOINT:-`chainstate --endpoints -t alchemy,mainnet`} TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts shares download",
"shares:totals": "TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts shares totals",
"shares:votings": "TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts shares votings",
"supply:reset": "TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts supply reset",
"supply:download": "API3TRACKER_ENDPOINT=${API3TRACKER_ENDPOINT:-`chainstate --endpoints -t alchemy,mainnet`} TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts supply download",
"treasuries:reset": "TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts treasuries reset",
"treasuries:download": "API3TRACKER_ENDPOINT=${API3TRACKER_ENDPOINT:-`chainstate --endpoints -t alchemy,mainnet`} TS_NODE_PROJECT=./tsconfig.cli.json yarn ts-node -T cli.ts treasuries download",
"prepare": "husky install"
},
"dependencies": {
"@next-auth/prisma-adapter": "1.0.5",
"@prisma/client": "^4.7.1",
"@types/js-yaml": "4.0.5",
"assert": "2.0.0",
"axios": "0.27.2",
"buffer": "6.0.3",
"csv-stringify": "6.2.2",
"ethers": "5.7.2",
"lodash": "4.17.21",
"js-yaml": "4.1.0",
"next": "13.0.5",
"next-auth": "4.20.1",
"nprogress": "0.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-infinite-scroller": "1.2.6",
"stream-browserify": "3.0.0",
"superjson": "1.11.0",
"swr": "1.3.0",
"yargs": "17.6.2"
},
"devDependencies": {
"@api3/eslint-plugin-commons": "^3.0.0",
"@babel/core": "7.20.2",
"@types/lodash": "4.17.13",
"@types/node": "^20.14.12",
"@types/nprogress": "0.2.0",
"@types/react": "18.0.14",
"@types/react-dom": "18.0.5",
"@types/react-infinite-scroller": "1.2.3",
"@types/yargs": "17.0.14",
"autoprefixer": "10.4.13",
"babel-loader": "8.3.0",
"eslint": "^8.57.0",
"eslint-config-next": "^13.5.7",
"husky": "8.0.2",
"postcss": "8.4.19",
"postcss-cli": "10.0.0",
"postcss-import": "^15.1.0",
"postcss-loader": "7.0.1",
"prettier": "^3.3.3",
"prettier-plugin-prisma": "3.14.0",
"prisma": "^4.7.1",
"tailwindcss": "3.2.4",
"ts-node": "10.9.2",
"typescript": "5.5.4"
},
"resolutions": {
"webpack": "^5"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}