1 | const { join } = require('path')
|
2 | const cors = require('./cors')
|
3 | const endpoints = require('./endpoints')
|
4 | const { mappings: coverage } = require('./coverage')
|
5 | const ui5 = require('./ui5')
|
6 | const { check } = require('reserve')
|
7 | const unhandled = require('./unhandled')
|
8 |
|
9 | module.exports = async job => check({
|
10 | port: job.port,
|
11 | mappings: [
|
12 | cors,
|
13 | ...job.mappings ?? [],
|
14 | ...job.serveOnly ? [] : endpoints(job),
|
15 | ...ui5(job),
|
16 | ...await coverage(job), {
|
17 |
|
18 | match: /^\/(.*)/,
|
19 | file: join(job.webapp, '$1'),
|
20 | strict: true,
|
21 | 'ignore-if-not-found': true
|
22 | },
|
23 | ...unhandled(job)
|
24 | ]
|
25 | })
|