-
Notifications
You must be signed in to change notification settings - Fork 4
/
package.json
127 lines (127 loc) · 7.62 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
{
"name": "@serlo/api.serlo.org-workspace",
"version": "0.0.0",
"private": true,
"bugs": {
"url": "https://github.com/serlo/api.serlo.org/issues"
},
"type": "module",
"repository": "serlo/api.serlo.org",
"license": "Apache-2.0",
"author": "Serlo Education e.V.",
"workspaces": [
"packages/*"
],
"scripts": {
"_eslint": "eslint \"{{__fixtures__,__tests-pacts__,__tests__,scripts,packages/*/src}/**/*,*}.{js,jsx,ts,tsx}\"",
"_prettier": "prettier .",
"auth": "scripts/authenticate.sh",
"_build": "node --loader ts-node/esm --experimental-specifier-resolution=node scripts/build",
"_jest": "node --no-warnings --experimental-vm-modules --experimental-specifier-resolution=node node_modules/jest/bin/jest.js",
"_start": "node --loader ts-node/esm --experimental-specifier-resolution=node scripts/start",
"build:server": "yarn _build packages/server/src/server.ts server.cjs",
"build:swr-queue-worker": "yarn _build packages/server/src/swr-queue-worker.ts swr-queue-worker.cjs",
"build:packages": "yarn lerna run build",
"check:all": "scripts/run_all_checks.sh",
"check:unused-dependencies": "depcheck",
"check:unused-exports": "ts-unused-exports tsconfig.json --excludePathsFromReport=packages/types/ --excludePathsFromReport=packages/server/src/types.ts --ignoreFiles=/dist/",
"codegen": "lerna run --stream codegen",
"deploy:images:staging": "lerna run --stream deploy:image:staging --",
"deploy:images:production": "lerna run --stream deploy:image:production --",
"docker:build": "run-s \"docker:build:*\"",
"docker:build:server": "docker build -f packages/server/Dockerfile -t api-server-local-build:latest --build-arg image=server .",
"docker:build:swr-queue-worker": "docker build -f packages/server/Dockerfile -t api-swr-queue-worker-local-build:latest --build-arg image=swr-queue-worker .",
"docker:rm": "run-p --continue-on-error --print-label \"docker:rm:*\" ",
"docker:rm:server": "docker image rm api-server-local-build",
"docker:rm:swr-queue-worker": "docker image rm api-swr-queue-worker-local-build",
"docker:run": "run-p --print-label \"docker:run:*\"",
"docker:run:server": "docker run -p 3001:3001 -d --env-file .env --env-file .env-docker --add-host=host.docker.internal:host-gateway --name api-server-from-local-build api-server-local-build",
"docker:run:swr-queue-worker": "docker run -p 3030:3000 -d --env-file .env --env-file .env-docker --add-host=host.docker.internal:host-gateway --name api-swr-queue-worker-from-local-build api-swr-queue-worker-local-build",
"docker:stop": "run-p --continue-on-error --print-label \"docker:stop:*\"",
"docker:stop:server": "docker stop api-server-from-local-build && docker container rm api-server-from-local-build",
"docker:stop:swr-queue-worker": "docker stop api-swr-queue-worker-from-local-build && docker container rm api-swr-queue-worker-from-local-build",
"down": "docker compose -f docker-compose.sso.yml -f docker-compose.kratos.yml -f docker-compose.yml down",
"format": "npm-run-all -c \"format:*\"",
"format:eslint": "yarn _eslint --fix",
"format:prettier": "yarn _prettier --write",
"format:prettier:staged": "prettier --write $(git diff --name-only --cached)",
"kratos:rebuild": "docker compose -f docker-compose.kratos.yml up -d --force-recreate --no-deps --build kratos",
"lint": "npm-run-all --parallel lint:prettier lint:tsc lint:eslint",
"lint:eslint": "yarn _eslint",
"lint:prettier": "yarn _prettier --check",
"lint:tsc": "tsc --noEmit",
"migrate:new": "lerna run --stream new",
"migrate:run": "packages/db-migrations/scripts/run_migrations.sh",
"migrate:all": "lerna run --stream migrate:all",
"migrate:up": "lerna run --stream migrate:up",
"migrate:build": "lerna run --stream build:all",
"migrate:push-image": "lerna run --stream push-image",
"mysql": "docker compose exec mysql serlo-mysql",
"mysql:delete-last-migration": "yarn mysql --execute 'DELETE FROM migrations ORDER BY id DESC LIMIT 1'",
"mysql:delete-all-migrations": "yarn mysql --execute 'DELETE FROM migrations'",
"mysql:list-migrations": "yarn mysql --execute 'SELECT * FROM migrations'",
"mysql:import-anonymous-data": "./scripts/mysql/import-anonymous-data.sh",
"mysql:rollback": "yarn mysql:recreate-db && docker compose exec mysql sh -c \"pv /docker-entrypoint-initdb.d/001-init.sql | serlo-mysql\" && yarn migrate:all",
"mysql:recreate-db": "yarn mysql -e 'DROP DATABASE IF EXISTS serlo; CREATE DATABASE serlo CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;'",
"postgres": "docker compose -f docker-compose.kratos.yml exec postgres psql -U serlo -d kratos",
"postgres:dump": "docker compose -f docker-compose.kratos.yml exec postgres pg_dump --clean --if-exists kratos --user serlo > kratos/postgres/001-init.sql",
"postgres:import-anonymous-data": "./scripts/postgres-import-anonymous-data.sh",
"postgres:rollback": "docker compose -f docker-compose.kratos.yml exec postgres bash -c 'psql -U serlo kratos < /docker-entrypoint-initdb.d/001-init.sql'",
"redis:cli": "docker compose exec redis redis-cli",
"redis:empty": "docker compose exec redis redis-cli FLUSHDB",
"redis:list": "docker compose exec redis redis-cli KEYS '*'",
"start": "run-s start:containers start:server",
"start:enmeshed": "docker-compose -f enmeshed/docker-compose.yml up -d",
"start:containers": "docker compose pull && docker compose up --detach --force-recreate && ./scripts/mysql/wait-for-mysql.sh && yarn migrate:all",
"start:kratos": "docker compose -f docker-compose.kratos.yml up --detach",
"start:sso": "docker compose -f docker-compose.sso.yml up --detach",
"start:server": "yarn _start packages/server/src/server.ts server.cjs",
"start:swr-queue-worker": "yarn _start packages/server/src/swr-queue-worker.ts swr-queue-worker.cjs",
"stop": "docker compose -f docker-compose.sso.yml -f docker-compose.kratos.yml -f docker-compose.yml stop",
"stop:enmeshed": "docker-compose -f enmeshed/docker-compose.yml down",
"test": "yarn _jest --config jest.config.js --forceExit",
"test:docker:server": "run-s \"test:docker:server:*\"",
"test:docker:server:playground": "curl --verbose http://localhost:3001/___graphql | grep '<title>GraphQL Playground</title>'",
"test:docker:server:graphql": "curl --verbose -H 'Content-type: application/json' --data '{\"query\": \"query { version }\" }' http://localhost:3001/graphql",
"test:docker:swr-queue-worker": "curl --verbose http://localhost:3030/.well-known/health | grep OK"
},
"dependencies": {
"graphql": "^16.9.0"
},
"devDependencies": {
"@eslint/compat": "^1.2.2",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"@luckycatfactory/esbuild-graphql-loader": "^3.8.1",
"@tsconfig/node20": "^20.1.4",
"@types/jest": "^29.5.12",
"@types/node": "^22.8.1",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"default-import": "^2.0.1",
"depcheck": "^1.4.7",
"esbuild": "^0.24.0",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-react": "^7.35.2",
"globals": "^15.12.0",
"graphql-tag": "^2.12.6",
"jest": "^29.7.0",
"jest-transform-graphql": "^2.1.0",
"lerna": "^8.1.8",
"msw": "^2.4.4",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.3",
"prettier-plugin-packagejson": "^2.5.2",
"prettier-plugin-sh": "^0.14.0",
"ts-node": "^10.9.2",
"ts-unused-exports": "^10.1.0",
"tsdx": "^0.14.1",
"typescript": "^5.5.4"
},
"packageManager": "[email protected]",
"engines": {
"node": "^20.0.0"
}
}