-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
package.json
156 lines (156 loc) · 5.68 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
{
"name": "api",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "dist/src/index.js",
"dependencies": {
"@elastic/elasticsearch": "^8.17.0",
"@isaacs/ttlcache": "^1.4.1",
"@koa/router": "^13.1.0",
"@maxmind/geoip2-node": "^5.0.0",
"@redocly/openapi-core": "^1.26.1",
"@scure/base": "^1.2.1",
"@socket.io/redis-adapter": "^8.3.0",
"adm-zip": "^0.5.16",
"any-ascii": "^0.3.2",
"bluebird": "^3.7.2",
"config": "^3.3.12",
"countries-list": "^3.1.1",
"crypto-random-string": "^5.0.0",
"csv-parser": "^3.1.0",
"elastic-apm-node": "^4.10.0",
"elastic-apm-utils": "^4.1.3",
"got": "^14.4.5",
"gunzip-maybe": "^1.4.2",
"h-logger2": "^1.3.2",
"h-logger2-elastic": "^6.2.1",
"http-errors": "^2.0.0",
"ipaddr.js": "^2.2.0",
"joi": "^17.13.3",
"jose": "^5.9.6",
"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": "^11.0.2",
"maxmind": "^4.3.23",
"mysql": "^2.18.1",
"physical-cpu-count": "^2.0.0",
"rate-limiter-flexible": "^5.0.4",
"redis": "^4.7.0",
"request-ip": "^3.3.0",
"semver": "^7.6.3",
"socket.io": "^4.8.1",
"validator": "^13.12.0"
},
"devDependencies": {
"@apideck/portman": "^1.30.7",
"@apidevtools/swagger-parser": "^10.1.0",
"@martin-kolarik/eslint-config": "^7.3.2",
"@redocly/cli": "^1.26.1",
"@stoplight/spectral-cli": "^6.14.2",
"@tsconfig/strictest": "^2.0.5",
"@types/adm-zip": "^0.5.7",
"@types/bluebird": "^3.5.42",
"@types/chai": "^5.0.1",
"@types/chai-subset": "^1.3.5",
"@types/config": "^3.3.5",
"@types/dockerode": "^3.3.32",
"@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.13",
"@types/mocha": "^10.0.10",
"@types/mock-fs": "^4.13.4",
"@types/node": "^20.17.10",
"@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.12.2",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"artillery": "^2.0.21",
"better-ajv-errors": "^1.2.0",
"c8": "^10.1.3",
"chai": "^5.1.2",
"dockerode": "^4.0.2",
"eslint": "^8.57.1",
"husky": "^9.1.7",
"lint-staged": "^15.3.0",
"mocha": "^11.0.2",
"mock-fs": "^5.4.1",
"nock": "^13.5.6",
"relative-day-utc": "^1.3.0",
"rimraf": "^6.0.1",
"sinon": "17.0.1",
"socket.io-client": "^4.8.1",
"start-server-and-test": "^2.0.9",
"supertest": "^7.0.0",
"testdouble": "^3.20.2",
"ts-node": "^10.9.2",
"tsx": "^4.19.2",
"typescript": "~5.4.5"
},
"optionalDependencies": {
"bufferutil": "^4.0.9",
"utf-8-validate": "^6.0.5"
},
"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 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": "tsx probes-stats/known.ts",
"start": "ELASTIC_APM_CONFIG_FILE=elastic-apm-node.cjs node --max_old_space_size=3584 --max-semi-space-size=128 --experimental-loader elastic-apm-node/loader.mjs -r elastic-apm-node/start.js dist/src/index.js",
"start:dev": "NODE_ENV=development FAKE_PROBE_IP=1 tsx src/index.ts",
"start:test": "NODE_ENV=test knex migrate:latest && NODE_ENV=test 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 mocha",
"test:mocha:dev": "TS_NODE_TRANSPILE_ONLY=true NODE_ENV=test TEST_MODE=unit 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:ipv4": "npm run test:e2e:docker && npm run test:e2e:run -- --grep IPv6 --invert",
"test:e2e:ipv6": "npm run test:e2e:docker && npm run test:e2e:run -- --grep IPv6",
"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"
}
}