kosmos/akkounts-api
kosmos
/
akkounts-api
Archived
8
1
Fork 0

Update all TS/ES deps, scripts, etc.

This commit is contained in:
Basti 2019-06-04 11:14:19 +02:00
parent 4a699450ca
commit 8b52bf93d4
No known key found for this signature in database
GPG Key ID: BE4634D632D39B67
6 changed files with 417 additions and 459 deletions

View File

@ -4,11 +4,12 @@
node: true node: true
mocha: true mocha: true
es6: true es6: true
parser: typescript-eslint-parser parser: "@typescript-eslint/parser"
parserOptions: parserOptions:
sourceType: module sourceType: module
ecmaFeatures: plugins:
modules: true - import
- promise
rules: rules:
generator-star-spacing: generator-star-spacing:
- 2 - 2

View File

@ -19,8 +19,8 @@ class MastodonBtcPayHookRoute extends BaseRoute {
if (req.body.status !== 'confirmed') return res.status(200) if (req.body.status !== 'confirmed') return res.status(200)
if ((typeof req.query.token !== 'string') || if ((typeof req.query.token !== 'string')
(req.query.token !== process.env.BTCPAY_WEBHOOK_TOKEN)) { || (req.query.token !== process.env.BTCPAY_WEBHOOK_TOKEN)) {
return res.status(401).json({ return res.status(401).json({
error: { message: 'Unauthorized' } error: { message: 'Unauthorized' }
}) })

View File

@ -16,9 +16,9 @@ class MastodonInvoicesRoute extends BaseRoute {
public async create (req: Request, res: Response) { public async create (req: Request, res: Response) {
const { email, price, currency } = req.body const { email, price, currency } = req.body
const hookUrl = process.env.BTCPAY_WEBHOOK_HOST + const hookUrl = process.env.BTCPAY_WEBHOOK_HOST
'/accounts/mastodon/btcpay_hook' + + '/accounts/mastodon/btcpay_hook'
`?token=${process.env.BTCPAY_WEBHOOK_TOKEN}` + `?token=${process.env.BTCPAY_WEBHOOK_TOKEN}`
// TODO validate input // TODO validate input
btcPayClient.create_invoice({ btcPayClient.create_invoice({

835
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,10 +4,15 @@
"description": "", "description": "",
"main": "dist/app/index.js", "main": "dist/app/index.js",
"scripts": { "scripts": {
"clean:app": "rm -rf dist/app/",
"clean:specs": "rm -rf dist/spec/",
"compile:app": "tsc",
"compile:specs": "tsc",
"dev": "tsc --watch & nodemon dist/app", "dev": "tsc --watch & nodemon dist/app",
"lint": "eslint app/ --ext ts", "lint": "eslint app/ --ext ts",
"start": "npm run dev", "start": "npm run dev",
"test": "rm -rf dist/spec/ && tsc && mocha -s 300 --recursive dist/spec/", "pretest": "npm run clean:specs && npm run compile:specs",
"test": "mocha -s 300 --recursive dist/spec/",
"ngrok": "ngrok http -region=eu 3200" "ngrok": "ngrok http -region=eu 3200"
}, },
"keywords": [], "keywords": [],
@ -27,18 +32,17 @@
"@types/mocha": "2.2.41", "@types/mocha": "2.2.41",
"@types/node": "10.14.8", "@types/node": "10.14.8",
"@types/nodemailer": "^4.6.6", "@types/nodemailer": "^4.6.6",
"@typescript-eslint/parser": "1.9.0",
"chai": "^4.2.0", "chai": "^4.2.0",
"colors": "^1.3.2", "colors": "^1.3.2",
"eslint": "4.0.0", "eslint": "5.16.0",
"eslint-config-airbnb-base": "11.2.0", "eslint-config-airbnb-base": "13.1.0",
"eslint-plugin-import": "2.3.0", "eslint-plugin-import": "2.17.3",
"eslint-plugin-promise": "3.5.0", "eslint-plugin-promise": "4.1.1",
"factory-girl": "^5.0.3", "factory-girl": "^5.0.3",
"mocha": "^6.1.4", "mocha": "^6.1.4",
"sinon": "^7.1.1", "sinon": "^7.1.1",
"supertest": "github:5apps/supertest#add-agent-default-support", "supertest": "github:5apps/supertest#add-agent-default-support",
"tsc": "1.20150623.0", "typescript": "3.5.1"
"typescript": "2.3.3",
"typescript-eslint-parser": "3.0.0"
} }
} }

View File

@ -5,10 +5,6 @@
"outDir": "dist", "outDir": "dist",
"sourceMap": true "sourceMap": true
}, },
"files": [
"./node_modules/@types/mocha/index.d.ts",
"./node_modules/@types/node/index.d.ts"
],
"include": [ "include": [
"app/**/*.ts", "app/**/*.ts",
"spec/**/*.ts" "spec/**/*.ts"