-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
package.json
152 lines (152 loc) · 5.5 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
{
"name": "api",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "dist/src/index.js",
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@koa/router": "^12.0.1",
"@maxmind/geoip2-node": "^5.0.0",
"@redocly/openapi-core": "^1.12.0",
"@scure/base": "^1.1.6",
"@socket.io/redis-adapter": "^8.3.0",
"adm-zip": "^0.5.12",
"any-ascii": "^0.3.2",
"bluebird": "^3.7.2",
"config": "^3.3.11",
"countries-list": "^3.1.0",
"crypto-random-string": "^5.0.0",
"csv-parser": "^3.0.0",
"got": "^14.2.1",
"gunzip-maybe": "^1.4.2",
"http-errors": "^2.0.0",
"ipaddr.js": "^2.2.0",
"joi": "^17.13.0",
"jose": "^5.7.0",
"knex": "^3.1.0",
"koa": "^2.15.3",
"koa-bodyparser": "^4.4.1",
"koa-compress": "^5.1.1",
"koa-conditional-get": "^3.0.0",
"koa-etag": "^4.0.0",
"koa-favicon": "^2.1.0",
"koa-json": "^2.0.2",
"koa-response-time": "^2.1.0",
"koa-static": "^5.0.0",
"lodash": "^4.17.21",
"lru-cache": "^10.2.2",
"maxmind": "^4.3.19",
"mysql": "^2.18.1",
"newrelic": "^11.16.0",
"physical-cpu-count": "^2.0.0",
"rate-limiter-flexible": "^5.0.3",
"redis": "^4.6.13",
"request-ip": "^3.3.0",
"semver": "^7.6.0",
"socket.io": "^4.7.5",
"validator": "^13.11.0",
"winston": "^3.13.0"
},
"devDependencies": {
"@apideck/portman": "^1.26.5",
"@apidevtools/swagger-parser": "^10.1.0",
"@martin-kolarik/eslint-config": "^7.3.2",
"@redocly/cli": "^1.12.0",
"@stoplight/spectral-cli": "^6.11.1",
"@tsconfig/strictest": "^2.0.5",
"@types/adm-zip": "^0.5.5",
"@types/bluebird": "^3.5.42",
"@types/chai": "^4.3.14",
"@types/chai-subset": "^1.3.5",
"@types/config": "^3.3.4",
"@types/dockerode": "^3.3.29",
"@types/http-errors": "^2.0.4",
"@types/koa": "^2.15.0",
"@types/koa__router": "^12.0.4",
"@types/koa-bodyparser": "^4.3.12",
"@types/koa-compress": "^4.0.6",
"@types/koa-conditional-get": "^2.0.3",
"@types/koa-etag": "^3.0.3",
"@types/koa-favicon": "^2.1.3",
"@types/koa-json": "^2.0.23",
"@types/koa-response-time": "^2.1.5",
"@types/koa-static": "^4.0.4",
"@types/lodash": "^4.17.0",
"@types/mocha": "^10.0.6",
"@types/mock-fs": "^4.13.4",
"@types/newrelic": "^9.14.3",
"@types/node": "^20.12.7",
"@types/physical-cpu-count": "^2.0.2",
"@types/request-ip": "^0.0.41",
"@types/semver": "^7.5.8",
"@types/sinon": "^17.0.3",
"@types/supertest": "^6.0.2",
"@types/throng": "^5.0.7",
"@types/validator": "^13.11.9",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"ajv": "^8.13.0",
"ajv-formats": "^3.0.1",
"artillery": "^2.0.11",
"better-ajv-errors": "^1.2.0",
"c8": "^9.1.0",
"chai": "^5.1.0",
"dockerode": "^4.0.2",
"eslint": "^8.57.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"mocha": "^10.4.0",
"mock-fs": "^5.2.0",
"nock": "^13.5.4",
"relative-day-utc": "^1.3.0",
"rimraf": "^5.0.5",
"sinon": "^17.0.1",
"socket.io-client": "^4.7.5",
"start-server-and-test": "^2.0.3",
"supertest": "^7.0.0",
"testdouble": "^3.20.2",
"ts-node": "^10.9.2",
"tsx": "^4.8.2",
"typescript": "^5.4.5"
},
"optionalDependencies": {
"bufferutil": "^4.0.8",
"utf-8-validate": "^6.0.3"
},
"scripts": {
"build": "tsc && npm run download:files && npm run commit:hash && cp -r public dist",
"commit:hash": "git rev-parse HEAD > data/LAST_API_COMMIT_HASH.txt",
"coverage": "npm run clean && NODE_ENV=test TEST_MODE=unit NEW_RELIC_ENABLED=false c8 mocha",
"clean": "rimraf coverage",
"download:files": "tsx src/lib/download-files.ts",
"prepare": "npm run download:files; husky || echo 'Failed to install husky'",
"stats": "NEW_RELIC_ENABLED=false tsx probes-stats/known.ts",
"start": "node --max_old_space_size=3584 --max-semi-space-size=128 --experimental-loader newrelic/esm-loader.mjs -r newrelic dist/src/index.js",
"start:dev": "NODE_ENV=development FAKE_PROBE_IP=1 NEW_RELIC_ENABLED=false tsx src/index.ts",
"start:test": "NODE_ENV=test knex migrate:latest && NODE_ENV=test NEW_RELIC_ENABLED=false tsx src/index.ts",
"lint": "npm run lint:js && npm run lint:types && npm run lint:docs",
"lint:fix": "npm run lint:js:fix && npm run lint:types && npm run lint:docs",
"lint:docs": "spectral lint public/**/spec.yaml",
"lint:js": "eslint --cache .",
"lint:js:fix": "eslint --cache --fix .",
"lint:types": "tsc --noEmit",
"test": "npm run lint && npm run test:mocha && npm run test:portman",
"test:dist": "node --test-reporter=spec test/dist.js",
"test:mocha": "NODE_ENV=test TEST_MODE=unit NEW_RELIC_ENABLED=false mocha",
"test:mocha:dev": "TS_NODE_TRANSPILE_ONLY=true NODE_ENV=test TEST_MODE=unit NEW_RELIC_ENABLED=false mocha",
"test:perf": "tsx test-perf/index.ts",
"test:portman": "TEST_DONT_RESTART_WORKERS=1 start-test 'npm run start:test' http://localhost:3000/health 'npm run test:portman:create && npm run test:portman:run' || E=$?; rm -rf tmp; exit $E;",
"test:portman:create": "mkdir -p tmp && redocly bundle public/v1/spec.yaml > tmp/spec.yaml && portman --cliOptionsFile test/tests/contract/portman-cli.json",
"test:portman:run": "newman run tmp/converted/globalpingApi.json -e test/tests/contract/newman-env.json --ignore-redirects",
"test:e2e": "npm run test:e2e:docker && npm run test:e2e:run",
"test:e2e:docker": "docker build -t globalping-api-e2e . && docker build -t globalping-probe-e2e https://github.com/jsdelivr/globalping-probe.git",
"test:e2e:run": "TS_NODE_TRANSPILE_ONLY=true NODE_ENV=test mocha --config .mocharc.e2e.cjs"
},
"lint-staged": {
"*.{cjs,js,json,ts}": "eslint --cache --fix"
},
"engines": {
"node": "20"
}
}