generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
229 lines (229 loc) · 8.87 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
{
"name": "approved-premises-ui",
"version": "0.0.1",
"description": "Approved Premises Ui",
"repository": "[email protected]:ministryofjustice/approved-premises-ui.git",
"license": "MIT",
"scripts": {
"copy-views": "cp -R server/views dist/server/",
"compile-sass": "sass --quiet-deps --no-source-map --load-path=node_modules/govuk-frontend/dist --load-path=node_modules/@ministryofjustice/frontend --load-path=. ./assets/sass/application.sass:./assets/stylesheets/application.css --style compressed",
"watch-ts": "tsc -w",
"watch-views": "nodemon --watch server/views -e html,njk -x npm run copy-views",
"watch-node": "DEBUG=gov-starter-server* nodemon -r dotenv/config --watch dist/ dist/server.js | bunyan -o short",
"watch-sass": "npm run compile-sass -- --watch",
"build": "npm run compile-sass && tsc && npm run copy-views",
"start": "node $NODE_OPTIONS dist/server.js | bunyan -o short",
"start:dev": "concurrently -k -p \"[{name}]\" -n \"Views,TypeScript,Node,Sass\" -c \"yellow.bold,cyan.bold,green.bold,blue.bold\" \"npm run watch-views\" \"npm run watch-ts\" \"npm run watch-node\" \"npm run watch-sass\"",
"start-feature": "export $(cat feature.env) && node $NODE_DEBUG_OPTION dist/server.js | bunyan -o short",
"watch-node-feature": "export $(cat feature.env) && nodemon --watch dist/ $NODE_DEBUG_OPTION dist/server.js | bunyan -o short",
"start-feature:dev": "concurrently -k -p \"[{name}]\" -n \"Views,TypeScript,Node,Sass\" -c \"yellow.bold,cyan.bold,green.bold,blue.bold\" \"npm run watch-views\" \"npm run watch-ts\" \"npm run watch-node-feature\" \"npm run watch-sass\"",
"record-build-info": "node ./bin/record-build-info",
"shellcheck": "npx shellcheck ./script/*[^utils][^data] ./script/utils/**",
"lint": "npx eslint . --cache --max-warnings 0",
"lint:fix": "npx eslint . --cache --max-warnings 0 --fix",
"typecheck": "tsc && tsc -p integration_tests",
"test": "jest --collectCoverage",
"test:debug": "jest --collectCoverage=false",
"test:ci": "jest --collectCoverage --runInBand --coverageThreshold=\"{}\"",
"test:integration": "npm run start-test-wiremock && start-server-and-test start-feature http://localhost:3007/ping int-test",
"test:integration:ui": "npm run start-test-wiremock && start-server-and-test start-feature:dev http://localhost:3007/ping int-test-ui",
"test:e2e:ci": "npx playwright test --config ./e2e/playwright.config.ts --project=dev",
"test:e2e:ui": "npm run test:e2e:ci -- --ui",
"test:e2e:local": "npx playwright test --config ./e2e/playwright.config.ts --project=local",
"test:e2e:local:ui": "npm run test:e2e:local -- --ui",
"test:e2e:local-dev-upstream": "npx playwright test --config ./e2e/playwright.config.ts --project=local-dev-upstream",
"test:e2e:local-dev-upstream:ui": "npm run test:e2e:local-dev-upstream -- --ui",
"install-playwright": "npx playwright install",
"security_audit": "npx audit-ci --config audit-ci.json",
"int-test": "cypress run --config video=false",
"int-test-ui": "cypress open --e2e --browser electron",
"clean": "rm -rf dist build node_modules stylesheets",
"start-test-wiremock": "docker compose -f docker-compose-test.yml up -d",
"generate-types": "script/generate-types",
"create-application:standard": "APPLICATION_TYPE='standard' npx playwright test --config ./e2e/playwright.config.ts --project=local utils/createApplication.spec.ts",
"create-application:standard:assess": "ASSESS_APPLICATION='true' npm run create-application:standard",
"create-application:emergency": "APPLICATION_TYPE='emergency' npx playwright test --config ./e2e/playwright.config.ts --project=local utils/createApplication.spec.ts",
"create-application:emergency:assess": "ASSESS_APPLICATION='true' npm run create-application:emergency",
"create-application:short-notice": "APPLICATION_TYPE='shortNotice' npx playwright test --config ./e2e/playwright.config.ts --project=local utils/createApplication.spec.ts",
"create-application:short-notice:assess": "ASSESS_APPLICATION='true' npm run create-application:short-notice"
},
"engines": {
"node": "^20.0.0",
"npm": "^10.0.0"
},
"jest": {
"preset": "ts-jest",
"globalSetup": "./server/testutils/setup.ts",
"collectCoverageFrom": [
"server/**/*.{ts,js,jsx,mjs}",
"!server/middleware/*.ts",
"!server/authentication/*.ts",
"!server/testutils/factories/*.ts"
],
"coverageThreshold": {
"global": {
"functions": 100
}
},
"testMatch": [
"<rootDir>/(server|job)/**/?(*.)(cy|test).{ts,js,jsx,mjs}"
],
"testPathIgnorePatterns": [
"<rootDir>/server/form-pages/utils/templates/test.ts"
],
"setupFilesAfterEnv": [
"<rootDir>/server/testutils/jest.setup.ts"
],
"testEnvironment": "node",
"reporters": [
"default",
[
"jest-junit",
{
"outputDirectory": "test_results/jest/"
}
],
[
"./node_modules/jest-html-reporter",
{
"outputPath": "test_results/unit-test-reports.html"
}
]
],
"moduleFileExtensions": [
"web.js",
"js",
"json",
"node",
"ts"
],
"transform": {
"^.+\\.tsx?$": [
"ts-jest",
{
"isolatedModules": true
}
]
}
},
"nodemonConfig": {
"ignore": [
".circleci/*",
"migrations/*",
"node_modules/*",
"test/*",
"integration_tests/*"
],
"delay": 2500,
"ext": "js,json,html,njk"
},
"dependencies": {
"@aws-sdk/client-sqs": "^3.621.0",
"@faker-js/faker": "^8.0.0",
"@ministryofjustice/frontend": "^2.0.0",
"@playwright/test": "^1.41.2",
"@sentry/node": "^7.14.1",
"@sentry/tracing": "^7.14.1",
"@total-typescript/shoehorn": "^0.1.0",
"agentkeepalive": "^4.2.1",
"applicationinsights": "^2.9.5",
"body-parser": "^1.20.0",
"bunyan": "^1.8.15",
"bunyan-format": "^0.2.1",
"case": "^1.6.3",
"compression": "^1.7.4",
"connect-flash": "^0.1.1",
"connect-redis": "^7.0.0",
"csurf": "^1.11.0",
"date-fns": "^3.0.0",
"dotenv": "^16.4.4",
"express": "^4.21.0",
"express-prom-bundle": "^7.0.0",
"express-session": "^1.17.3",
"fishery": "^2.2.2",
"govuk-frontend": "^5.0.0",
"helmet": "^7.0.0",
"http-errors": "^2.0.0",
"jest-diff": "^29.6.2",
"jquery": "^3.6.1",
"jsonpath": "^1.1.1",
"jwt-decode": "^4.0.0",
"method-override": "^3.0.0",
"nocache": "^4.0.0",
"notifications-node-client": "^8.0.0",
"nunjucks": "^3.2.4",
"passport": "^0.7.0",
"passport-oauth2": "^1.6.1",
"path-to-regexp": "^8.1.0",
"prom-client": "^15.0.0",
"qs": "^6.11.0",
"redis": "^4.3.1",
"reflect-metadata": "^0.2.0",
"static-path": "^0.0.4",
"superagent": "^9.0.0",
"underscore": "^1.13.6",
"url-value-parser": "^2.2.0",
"uuid": "^10.0.0"
},
"devDependencies": {
"@golevelup/ts-jest": "^0.5.0",
"@pact-foundation/pact": "^12.0.0",
"@types/bunyan": "^1.8.8",
"@types/bunyan-format": "^0.2.5",
"@types/compression": "^1.7.2",
"@types/connect-flash": "0.0.40",
"@types/cookie-session": "^2.0.44",
"@types/csurf": "^1.11.2",
"@types/express-session": "^1.17.5",
"@types/http-errors": "^2.0.0",
"@types/jest": "^29.0.0",
"@types/jest-when": "^3.5.5",
"@types/jsonpath": "^0.2.0",
"@types/jsonwebtoken": "^9.0.0",
"@types/method-override": "^0.0.35",
"@types/node": "^20.0.0",
"@types/nunjucks": "^3.2.1",
"@types/passport": "^1.0.11",
"@types/passport-oauth2": "^1.4.11",
"@types/superagent": "^8.0.0",
"@types/supertest": "^6.0.0",
"@types/underscore": "^1.11.4",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"audit-ci": "^7.0.0",
"axe-core": "^4.7.0",
"concurrently": "^8.0.0",
"cookie-session": "^2.0.0",
"cypress": "^13.6.5",
"cypress-axe": "^1.4.0",
"cypress-multi-reporters": "^1.6.1",
"eslint": "^8.24.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.5.1",
"eslint-plugin-cypress": "^3.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-no-only-tests": "^3.0.0",
"eslint-plugin-prettier": "^5.0.0-alpha.1",
"jest": "^29.5.0",
"jest-html-reporter": "^3.7.1",
"jest-junit": "^16.0.0",
"jest-pact": "^0.11.0",
"jest-when": "^3.6.0",
"jsonwebtoken": "^9.0.0",
"mocha-junit-reporter": "^2.1.0",
"nock": "^13.2.9",
"nodemon": "^3.0.0",
"nyc": "^17.0.0",
"openapi-typescript-codegen": "^0.29.0",
"prettier": "^3.0.0",
"sass": "^1.55.0",
"shellcheck": "^3.0.0",
"start-server-and-test": "^2.0.0",
"supertest": "^7.0.0",
"swagger-mock-validator": "^11.0.0",
"ts-jest": "^29.1.0",
"typescript": "^5.0.0"
}
}