This repository has been archived by the owner on Apr 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpackage.json
241 lines (241 loc) · 8.94 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
230
231
232
233
234
235
236
237
238
239
240
241
{
"name": "camino-api",
"version": "0.38.0",
"description": "Camino api",
"license": "AGPL-3.0-or-later",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/MTES-MCT/camino-api"
},
"author": {
"name": "François Romain",
"email": "francoisromain@gmail.com",
"url": "https://francoisromain.com"
},
"homepage": "https://github.com/MTES-MCT/camino-api",
"engines": {
"node": ">=16.12.0",
"npm": ">=7.24.0"
},
"main": "dist/src/index.js",
"scripts": {
"bim": "npm i && npm run build && npm run db:recreate && npm run db:import",
"build": "rm -rf dist && tsc && mkdir -p ./dist/src/api/graphql && cp -r ./src/api/graphql/schemas ./dist/src/api/graphql",
"commit": "lint-staged && git-cz",
"daily": "node ./dist/src/scripts/daily.js",
"monthly": "node ./dist/src/scripts/monthly.js",
"db:dump": "pg_dump --host=localhost --username=postgres --clean --if-exists --format=c --no-owner --no-privileges --dbname=camino --file=./backups/camino.sql",
"db:export": "rm -rf sources && node ./dist/src/scripts/database-to-json-export.js",
"db:import": "pg_restore --host=localhost --username=postgres --clean --if-exists --no-owner --no-privileges --dbname=camino ./backups/camino.sql",
"db:prod-fetch": "scp -P 212 $u@camino.beta.gouv.fr:/srv/backups/camino.sql backups/",
"db:public-import": "pg_restore --host=localhost --username=postgres --clean --if-exists --no-owner --no-privileges --dbname=camino ./backups/camino-public.sql",
"db:recreate": "dropdb --host=localhost --username=postgres camino && createdb --host=localhost --username=postgres camino",
"db:user": "ts-node ./src/knex/cli-user-add.ts",
"db:migrate": "ts-node ./src/knex/migrate.ts",
"db:add-migration": "knex migrate:make",
"dev": "nodemon",
"dev:daily": "ts-node --transpile-only ./src/scripts/daily.ts",
"dev:daily-debug": "node -r ts-node/register --inspect-brk=3000 ./src/scripts/daily.ts",
"dev:backups-archive": "tar -zcvf backups/`date +%Y%m%d_%H%M%S`-camino.tar.gz backups/files/* backups/camino.sql",
"dev:monthly": "ts-node --transpile-only ./src/scripts/monthly.ts",
"dev:schema": "node src/dev/api/graphql-dsl-to-query-convert.js",
"dev:update": "npm-check-updates -u && npm install && npm audit fix",
"docs": "rm -rf docs && typedoc src --sourcefile-url-prefix \"https://github.com/MTES-MCT/camino-api/blob/master/\"",
"documents:check": "node ./dist/src/scripts/documents-check.js",
"lint": "prettier --write . && eslint --fix .",
"start": "node ./dist/src/index.js",
"test": "cross-env jest --testPathIgnorePatterns=tests --runInBand --detectOpenHandles --forceExit",
"test:unit": "cross-env jest --testPathIgnorePatterns=tests --runInBand --detectOpenHandles --watch",
"test:integration": "cross-env JWT_SECRET=secret-tests jest --testPathIgnorePatterns=src --runInBand --detectOpenHandles --watch --testTimeout=20000",
"ci:lint": "prettier --check . && eslint .",
"ci:test-unit": "cross-env jest --testPathIgnorePatterns=tests --ci --runInBand --detectOpenHandles --forceExit --testTimeout=20000",
"ci:test-integration": "cross-env JWT_SECRET=secret-tests JWT_SECRET_REFRESH=refresh-secret jest --testPathIgnorePatterns=src --runInBand --detectOpenHandles --ci --forceExit --testTimeout=20000",
"ci:codecov": "codecov",
"prepare": "husky install"
},
"@comment dependencies": {
"modules esm": "crypto-random-string, p-queue, @sindresorhus/slugify, email-regex, decamelize, dateformat, node-fetch à ne pas updater tant que on ne compile pas pour es2020: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c. Pas simple de migrer ts-node.",
"typedoc": "bloqué à 0.21.19 https://github.com/mipatterson/typedoc-plugin-pages/issues/64"
},
"dependencies": {
"@graphql-tools/graphql-file-loader": "^7.3.5",
"@graphql-tools/load": "^7.5.3",
"@placemarkio/check-geojson": "^0.1.8",
"@sentry/node": "^6.18.2",
"@sentry/types": "^6.18.2",
"@sindresorhus/slugify": "^1.1.2",
"@turf/center": "^6.5.0",
"@turf/intersect": "^6.5.0",
"@types/basic-auth": "^1.1.3",
"@types/bcryptjs": "^2.4.2",
"@types/compression": "1.7.2",
"@types/cookie-parser": "^1.4.2",
"@types/cors": "^2.8.12",
"@types/cron": "^1.7.3",
"@types/dateformat": "^5.0.0",
"@types/express": "^4.17.13",
"@types/express-jwt": "6.0.4",
"@types/express-serve-static-core": "^4.17.28",
"@types/geojson": "^7946.0.8",
"@types/graphql-type-json": "^0.3.2",
"@types/graphql-upload": "^8.0.11",
"@types/jest": "^27.4.1",
"@types/jsonwebtoken": "^8.5.8",
"@types/node": "^17.0.21",
"@types/node-fetch": "^2.5.12",
"@types/node-mailjet": "^3.3.8",
"@types/pg": "^8.6.5",
"@types/proj4": "^2.5.2",
"@types/shpjs": "^3.4.1",
"@types/sql-formatter": "^2.3.0",
"basic-auth": "^2.0.1",
"bcryptjs": "^2.4.3",
"camelcase": "^6.3.0",
"cerbere": "^0.2.3",
"chalk": "^4.1.2",
"compression": "^1.7.4",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"cron": "^1.8.2",
"cross-env": "^7.0.3",
"crypto-random-string": "^3.3.1",
"dateformat": "^4.5.1",
"decamelize": "^5.0.0",
"dotenv": "^16.0.0",
"email-regex": "4.0.0",
"express": "^4.17.3",
"express-graphql": "^0.12.0",
"express-jwt": "^6.1.1",
"geojson-rewind": "^0.3.1",
"graphql": "^16.3.0",
"graphql-fields": "^2.0.3",
"graphql-scalars": "^1.15.0",
"graphql-type-json": "^0.3.2",
"graphql-upload": "^13.0.0",
"html-to-text": "^8.1.0",
"jsondiffpatch": "^0.4.1",
"jsonwebtoken": "^8.5.1",
"jszip": "^3.7.1",
"knex": "1.0.4",
"make-dir": "^3.1.0",
"matomo-tracker": "^2.2.4",
"node-fetch": "^2.6.5",
"node-mailjet": "^3.3.7",
"objection": "^3.0.1",
"p-queue": "^6.6.2",
"pg": "^8.7.3",
"proj4": "^2.8.0",
"shpjs": "^4.0.2",
"ts-node": "^10.7.0",
"tus-node-server": "^0.5.2",
"typescript": "^4.6.2",
"winston": "^3.6.0",
"xlsx": "^0.18.4"
},
"devDependencies": {
"@jest/types": "^27.5.1",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"codecov": "^3.8.3",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard": "^17.0.0-1",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^26.1.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-standard": "^5.0.0",
"eslint-plugin-tsdoc": "^0.2.14",
"husky": "^7.0.4",
"jest": "^27.5.1",
"lint-staged": "^12.3.6",
"nodemon": "^2.0.15",
"npm-check-updates": "^12.5.3",
"pg-escape": "^0.2.0",
"prettier-eslint": "^13.0.0",
"semantic-release": "^19.0.2",
"sql-formatter": "^4.0.2",
"standard-version": "^9.3.2",
"supertest": "^6.2.2",
"ts-jest": "^27.1.3",
"typedoc": "^0.21.9",
"typedoc-plugin-pages-fork": "^0.0.1",
"typedoc-plugin-sourcefile-url": "^1.0.6"
},
"prettier": {
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid"
},
"eslintConfig": {
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"standard",
"prettier"
],
"env": {
"node": true,
"jest/globals": true
},
"plugins": [
"jest",
"@typescript-eslint"
],
"rules": {
"newline-before-return": 1,
"no-use-before-define": 0,
"no-redeclare": 0,
"no-return-await": "error",
"default-param-last": 0,
"no-unused-vars": 0,
"no-restricted-syntax": [
"error",
{
"message": "leftJoinRelation is deprecated. Use leftJoinRelated instead.",
"selector": "Identifier[name='leftJoinRelation']"
}
],
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-unused-vars": [
"error"
]
}
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"lint-staged": {
"*.{js,ts}": "eslint --cache --fix",
"*.{ts,js,graphql}": "prettier --write"
},
"release": {
"branches": [
"master"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/github",
"@semantic-release/npm",
"@semantic-release/git"
]
}
}