-
Notifications
You must be signed in to change notification settings - Fork 5
/
package.json
153 lines (153 loc) · 7.45 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
{
"name": "course-catalog-api",
"version": "1.0.9",
"license": "AGPL-3.0",
"scripts": {
"about:babel-node-ts": "//// This command is used to run Typescript files on the fly. Mainly used in other commands, not standalone",
"babel-node-ts": "babel-node --extensions '.js,.jsx,.ts,.tsx'",
"about:dev": "//// Runs the API server - the course catalog API",
"dev": "NODE_ENV=dev node --watch $(yarn babel-node-ts graphql/index.ts)",
"about:dev:notifs": "//// Runs the API server along with the notifications server",
"dev:notifs": "ENABLE_NOTIFS=true yarn dev",
"about:scrape": "//// Scrapes ALL of the latest class data from Banner",
"scrape": "yarn babel-node-ts --max_old_space_size=12000 scrapers/main.ts",
"about:scrape:custom": "//// Runs a scrape with some custom configuration. Read the backend docs for more info",
"scrape:custom": "CUSTOM_SCRAPE=true yarn scrape",
"about:updater": "//// Scrapes frequently-changing class data from Banner (eg. seats free)",
"updater": "yarn babel-node-ts services/updater.ts",
"about:resetIndex": "//// Deletes the Elasticsearch indexes and re-creates them. This will discard all existing data",
"resetIndex": "yarn babel-node-ts scripts/resetIndex.ts",
"about:resetIndex:noLoss": "//// Resets the Elasticsearch indexes without losing their data. This allows us to update the index mapping (which can't be done directly while there is data in the index)",
"resetIndex:noLoss": "yarn babel-node-ts scripts/resetIndexWithoutLoss.ts",
"about:populateES": "//// Updates Elasticsearch to contain all the data we currently have in the database",
"populateES": "yarn babel-node-ts scripts/populateES.ts",
"about:dev:docker": "//// Creates the Docker containers needed to run the API locally",
"dev:docker": "docker compose -f infrastructure/dev/compose.yaml up -d",
"about:dev:docker:del": "//// Deletes the aforementioned Docker containers",
"dev:docker:del": "docker compose -f infrastructure/dev/compose.yaml down -v",
"about:dev:docker:server": "//// Experimental: runs the FULL STACK (ie. including searchneu) via Docker",
"dev:docker:server": "docker compose -f infrastructure/dev/docker-compose-server.yml up -d",
"about:dev:docker:server:del": "//// Deletes the aforementioned Docker containers",
"dev:docker:server:del": "docker compose -f infrastructure/dev/docker-compose-server.yml down -v",
"about:db:migrate": "//// Applies Prisma migrations. Think of migrations as `git` for databases - this allows us to change the structure of the DB in a way that can be easily replicated by all developers (and in production)",
"db:migrate": "yarn prisma migrate dev",
"about:db:refresh": "//// Generates Typescript files based on the schema of the database",
"db:refresh": "yarn prisma generate",
"about:lint": "//// Ensures that our code follows best practices",
"lint": "yarn eslint --ignore-path .gitignore --ext .js,.ts .",
"about:tsc": "//// Runs TSC (because of our config, this will NOT compile the files, just typecheck them)",
"tsc": "tsc",
"about:test": "//// Runs a basic suite of unit and integration tests",
"test": "yarn jest --verbose --testPathIgnorePatterns='(seq|reg|git|unit).[jt]s'",
"about:dbtest": "//// Runs tests interacting with our database. Must have the Docker containers running. This won't touch live data - it will create and teardown a temporary database.",
"dbtest": "jest -i --projects tests/database --verbose",
"about:unittest": "//// Runs unit tests. Does not need db, elasticsearch, spun up. Does not need the Docker containers to be running.",
"unittest": "jest -i --projects tests/unit --verbose",
"about:build_backend": "//// Compiles this project",
"build_backend": "rm -rf dist && mkdir -p dist && babel --extensions '.js,.ts' . -d dist/ --copy-files --ignore node_modules --ignore .git --include-dotfiles && rm -rf dist/.git",
"about:build": "//// Compiles this project, surpressing output",
"build": "yarn -s build_backend",
"about:prod:scrape": "//// Runs the scrapers (same as `yarn scrape`, but on the compiled project)",
"prod:scrape": "node dist/scrapers/main.js",
"about:prod": "//// Runs the API (same as `yarn dev`, but on the compiled project)",
"prod": "node dist/graphql/index.js",
"about:prod:updater": "//// Runs the updater (same as `yarn updater`, but on the compiled project)",
"prod:updater": "node dist/services/updater.js",
"about:prod:db:migrate": "//// Runs the Prisma migrations (same as `yarn db:migrate`, but on the compiled project)",
"prod:db:migrate": "yarn prisma migrate deploy --preview-feature",
"prepare": "husky"
},
"repository": {
"type": "git",
"url": "https://github.com/sandboxnu/course-catalog-api.git"
},
"main": "yarn prod",
"dependencies": {
"@babel/core": "^7.10.2",
"@babel/node": "^7.0.0",
"@babel/register": "^7.0.0",
"@elastic/elasticsearch": "7.17.0",
"@prisma/client": "^5.0.0",
"@typescript-eslint/typescript-estree": "^8.10.0",
"amplitude": "^6.0.0",
"apollo-server": "^3.13.0",
"async-retry": "^1.3.1",
"babel-core": "^7.0.0-bridge.0",
"cacheable-lookup": "^6.1.0",
"cheerio": "^0.22.0",
"colors": "^1.4.0",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"eslint-plugin-deprecation": "^1.2.1",
"express": "^4.21.1",
"fs-extra": "^11.2.0",
"got": "^11.8.2",
"graphql": "^16.9.0",
"graphql-type-json": "^0.3.0",
"he": "^1.2.0",
"jsonwebtoken": "^9.0.2",
"lodash": "^4.17.4",
"moment": "^2.30.1",
"msgpack5": "^6.0.2",
"multi-progress-bars": "4.2.3",
"object-hash": "^3.0.0",
"p-map": "^4.0.0",
"pg": "^8.13.0",
"regenerator-runtime": "^0.14.1",
"request": "^2.81.0",
"request-promise-native": "^1.0.9",
"rollbar": "^2.26.4",
"tough-cookie": "^5.0.0",
"twilio": "^5.3.4",
"urijs": "^1.19.11",
"uuid": "^10.0.0",
"winston": "^3.15.0",
"winston-daily-rotate-file": "^5.0.0"
},
"devDependencies": {
"@babel/cli": "^7.10.1",
"@babel/preset-env": "^7.25.8",
"@babel/preset-typescript": "^7.8.3",
"@types/async-retry": "^1.4.9",
"@types/cheerio": "^0.22.30",
"@types/fs-extra": "^11.0.4",
"@types/he": "^1.2.3",
"@types/jest": "^29.5.0",
"@types/jsonwebtoken": "^9.0.7",
"@types/lodash": "^4.17.12",
"@types/msgpack5": "^3.4.6",
"@types/node": "22.7.7",
"@types/request": "^2.48.12",
"@types/request-promise-native": "^1.0.21",
"@types/urijs": "^1.19.25",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"coveralls": "^3.0.6",
"docsify-cli": "^4.4.4",
"eslint": "^8.8.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^16.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.0.0",
"eslint-plugin-babel": "^5.1.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-promise": "^6.0.0",
"husky": "^9.0.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"nock": "^13.5.5",
"prettier": "^3.0.0",
"pretty-quick": "4",
"prisma": "^5.0.0",
"typescript": "^5.6.0",
"yarn-deduplicate": "^6.0.2"
},
"about:engines": [
"This helps us ensure that only specific versions of Node are used to run this project",
"Older versions may lead to unexpected errors due to dependency issues, etc."
],
"engines": {
"node": ">=20"
}
}