balena-supervisor/package.json
Cameron Diver 1060e70e82
dev: Add package.json tasks to aid debugging supervisor tests
Running mocha on the coffee and ts sources resulted in unreliable
sourcemaps, and breakpoints not working, among other things. To solve
this, this commit adds package.json tasks which will build both the
coffeescript and typescript files with their sourcemaps and places it
into a build directory. It also copies over other dependent files, such
as test data and migrations.

Another task adds a mocha debugging command, which can be connected to
using a node debugger.

Another tasks runs mocha without a debugging interface, but also without
running linters etc first. This enables the tests to be run much faster.

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-08-16 16:38:40 +01:00

87 lines
2.8 KiB
JSON

{
"name": "resin-supervisor",
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
"version": "7.16.7",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/resin-io/resin-supervisor.git"
},
"scripts": {
"start": "./entry.sh",
"build": "webpack",
"lint": "resin-lint --typescript src/ test/",
"test": "npm run lint && JUNIT_REPORT_PATH=report.xml mocha --exit -r ts-node/register -r coffee-script/register -r register-coffee-coverage test/*.{js,coffee} && npm run coverage",
"test:fast": "mocha --exit -r ts-node/register -r coffee-script/register test/*.{js,coffee}",
"test:build": "tsc && coffee -m -c -o build . && cp -r test/data build/test/ && cp -r src/migrations build/src && cp package.json build",
"test:debug": "npm run test:build && mocha --inspect-brk build/test/*.js",
"versionist": "versionist",
"coverage": "istanbul report text && istanbul report html"
},
"dependencies": {
"mkfifo": "^0.1.5",
"sqlite3": "^3.1.0"
},
"engines": {
"node": "^6.13.1"
},
"devDependencies": {
"@types/bluebird": "^3.5.20",
"@types/express": "^4.11.1",
"@types/knex": "^0.14.14",
"@types/lodash": "^4.14.109",
"@types/mz": "0.0.32",
"@types/node": "^10.3.1",
"@types/rwlock": "^5.0.2",
"JSONStream": "^1.1.2",
"blinking": "~0.0.2",
"bluebird": "^3.5.0",
"body-parser": "^1.12.0",
"buffer-equal-constant-time": "^1.0.1",
"chai-events": "0.0.1",
"coffee-loader": "^0.7.3",
"coffee-script": "~1.11.0",
"copy-webpack-plugin": "^4.2.3",
"dbus-native": "^0.2.5",
"docker-delta": "^2.1.0",
"docker-progress": "^2.7.2",
"docker-toolbelt": "^3.3.2",
"duration-js": "^4.0.0",
"event-stream": "^3.0.20",
"express": "^4.0.0",
"istanbul": "^0.4.5",
"json-mask": "^0.3.8",
"knex": "~0.12.3",
"lockfile": "^1.0.1",
"lodash": "^4.16.3",
"log-timestamp": "^0.1.2",
"memoizee": "^0.4.1",
"mixpanel": "0.0.20",
"mkdirp": "^0.5.1",
"mocha": "^5.1.1",
"mochainon": "^2.0.0",
"mz": "^2.7.0",
"network-checker": "~0.0.5",
"node-loader": "^0.6.0",
"null-loader": "^0.1.1",
"pinejs-client": "^2.4.0",
"register-coffee-coverage": "0.0.1",
"request": "^2.51.0",
"resin-lint": "^1.5.7",
"resin-register-device": "^3.0.0",
"resin-sync": "^9.3.0",
"resumable-request": "^2.0.0",
"rwlock": "^5.0.0",
"semver": "^5.3.0",
"semver-regex": "^1.0.0",
"shell-quote": "^1.6.1",
"ts-loader": "^3.5.0",
"ts-node": "^6.0.1",
"typed-error": "^2.0.0",
"typescript": "^2.8.3",
"uglifyjs-webpack-plugin": "^1.0.1",
"versionist": "^2.8.0",
"webpack": "^3.0.0"
}
}