-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.json
79 lines (79 loc) · 4.02 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
{
"name": "push-analytics",
"version": "1.0.1",
"description": "A NodeJS service using Puppeteer to generate images and HTML to insert into an email",
"main": "dist/index.js",
"author": "Hendrik de Graaf",
"license": "MIT",
"private": true,
"scripts": {
"prepare": "husky",
"release": "release-it",
"build:compile": "./scripts/build.sh",
"build:compress": "./scripts/compress.sh",
"build": "npm run build:compile && npm run build:compress",
"lint:tsc": "npx tsc --noEmit -p ./tsconfig.json",
"lint:eslint": "npx eslint --ignore-pattern 'dist/**/*' --no-warn-ignored **/*.[js][ts] .",
"lint:prettier": "npx prettier --check .",
"lint": "npm run lint:tsc && npm run lint:eslint && npm run lint:prettier",
"format": "npx prettier --write . && npx eslint --quiet --fix --ext .js,.ts .",
"test:unit": "npx tsc --noEmit && TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true node --test --test-reporter spec --require ts-node/register $(find ./src -name '*.test.ts')",
"test:unit:watch": "npx tsc --noEmit && TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true node --test --watch --test-reporter spec --require ts-node/register $(find ./src -name '*.test.ts')",
"test:e2e": "npx tsc -p ./tsconfig.e2e.json --noEmit && HOST=http://localhost PORT=1337 TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true node --test --test-reporter spec --require ts-node/register $(find ./e2e -name '*.e2e.ts')",
"test:e2e:watch": "npx tsc -p ./tsconfig.e2e.json --noEmit && HOST=http://localhost PORT=1337 TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true node --test --watch --test-reporter spec --require ts-node/register $(find ./e2e -name '*.e2e.ts')",
"docker:build:local": "docker build -t dhis2/push-analytics:local .",
"docker:compose:dev": "docker compose --env-file ./.env.e2e up -d web db db-dump post-install-scripts",
"docker:compose:demo": "PUSH_ANALYTICS_IMAGE=dhis2/push-analytics:latest docker compose --env-file ./.env.e2e up -d web db db-dump fake-smtp-server post-install-scripts push-analytics",
"db-dump:default": "pg_dump postgresql://dhis:dhis@localhost:5432/dhis -T 'analytics*' -T '_*' -T 'rs_*' | gzip >dump.sql.gz",
"db-dump:with-analytics": "pg_dump 'postgresql://dhis:dhis@localhost:5432/dhis' | gzip >dump_with_analytics.sql.gz",
"start:dev": "nodemon --exec ts-node -r dotenv/config src/index.ts",
"start:prod": "npm run build && node -r dotenv/config ./dist/index.js"
},
"devDependencies": {
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@commitlint/types": "^19.0.3",
"@dhis2/cli-style": "^10.7.5",
"@eslint/js": "^9.17.0",
"@release-it/conventional-changelog": "^8.0.1",
"@types/eslint__js": "^8.42.3",
"@types/node": "^22.10.5",
"@types/string-similarity": "^4.0.2",
"@types/supertest": "^6.0.2",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"dotenv": "^16.4.7",
"eslint": "^9.17.0",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"nock": "^13.5.6",
"nodemon": "^3.1.9",
"release-it": "^17.6.0",
"rimraf": "^6.0.1",
"string-similarity": "^4.0.4",
"supertest": "^7.0.0",
"ts-node": "^10.9.2",
"tsc-files": "^1.1.4",
"typescript": "^5.5.4",
"typescript-eslint": "^8.19.1"
},
"dependencies": {
"@dhis2/d2-ui-rich-text": "^7.4.3",
"axios": "^1.7.9",
"globals": "^15.14.0",
"minimatch": "^10.0.1",
"puppeteer": "^23.3.0"
},
"lint-staged": {
"*.ts": [
"bash -c 'tsc-files --noEmit'",
"eslint --quiet --fix",
"prettier --write --ignore-unknown"
],
"*.js": [
"eslint --quiet --fix",
"prettier --write --ignore-unknown"
],
"*.{json,html,md}": "prettier --write --ignore-unknown"
}
}