Skip to content

Commit 0e8e383

Browse files
committed
Remove unmaintained Nightmare library
1 parent a204baa commit 0e8e383

File tree

13 files changed

+12
-51
lines changed

13 files changed

+12
-51
lines changed

scripts/balance/aws.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import assert from "assert"
22

33
import inquirer from "inquirer"
4-
import Nightmare from "nightmare"
54

65
import {prettyPrint} from "../helpers.js"
76

@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413

1514
async function getBalance (options = {}) {
1615
const {
17-
showBrowser = true,
1816
username,
1917
password,
2018
isDevMode = false,
19+
nightmare,
2120
} = options
2221

2322
assert(username)
2423
assert(password)
2524

2625
if (isDevMode) return "1234.56 €"
2726

28-
const nightmare = new Nightmare({show: showBrowser})
2927
const loginUrl = `https://www.amazon.com
3028
/ap/signin?openid.assoc_handle=aws
3129
&openid.return_to=https%3A%2F%2Fsignin.aws.amazon.com

scripts/balance/dkb.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import assert from "assert"
22

33
import inquirer from "inquirer"
4-
import Nightmare from "nightmare"
54

65
import {prettyPrint} from "../helpers.js"
76

@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413

1514
async function getBalance (options = {}) {
1615
const {
17-
showBrowser = true,
1816
username,
1917
password,
2018
isDevMode = false,
19+
nightmare,
2120
} = options
2221

2322
assert(username)
2423
assert(password)
2524

2625
if (isDevMode) return "1234.56 €"
2726

28-
const nightmare = new Nightmare({show: showBrowser})
2927
const baseUrl = "https://www.dkb.de"
3028
const loginUrl = `${baseUrl}/banking`
3129

scripts/balance/fidor.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import assert from "assert"
22

33
import inquirer from "inquirer"
4-
import Nightmare from "nightmare"
54

65
import {prettyPrint} from "../helpers.js"
76

@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413

1514
async function getBalance (options = {}) {
1615
const {
17-
showBrowser = true,
1816
username,
1917
password,
2018
isDevMode = false,
19+
nightmare,
2120
} = options
2221

2322
assert(username)
2423
assert(password)
2524

2625
if (isDevMode) return "1234.56 €"
2726

28-
const nightmare = new Nightmare({show: showBrowser})
2927
const baseUrl = "https://banking.fidor.de"
3028
const loginUrl = `${baseUrl}/login`
3129

scripts/balance/finvesto.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import assert from "assert"
22

33
import inquirer from "inquirer"
4-
import Nightmare from "nightmare"
54

65
import {prettyPrint} from "../helpers.js"
76

@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413

1514
async function getBalance (options = {}) {
1615
const {
17-
showBrowser = true,
1816
username,
1917
password,
2018
isDevMode = false,
19+
nightmare,
2120
} = options
2221

2322
assert(username)
2423
assert(password)
2524

2625
if (isDevMode) return "1234.56 €"
2726

28-
const nightmare = new Nightmare({show: showBrowser})
2927
const baseUrl = "https://portal.ebase.com"
3028
const loginUrl = `${baseUrl}/(e1)/finvesto`
3129

scripts/balance/hypovereinsbank.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import assert from "assert"
22

33
import inquirer from "inquirer"
4-
import Nightmare from "nightmare"
54

65
import {prettyPrint} from "../helpers.js"
76

@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413

1514
async function getBalance (options = {}) {
1615
const {
17-
showBrowser = true,
1816
username,
1917
password,
2018
isDevMode = false,
19+
nightmare,
2120
} = options
2221

2322
assert(username)
2423
assert(password)
2524

2625
if (isDevMode) return "1234.56 €"
2726

28-
const nightmare = new Nightmare({show: showBrowser})
2927
const baseUrl = "https://my.hypovereinsbank.de"
3028
const loginUrl = `${baseUrl}/login?view=/de/login.jsp`
3129

scripts/balance/mbs.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import assert from "assert"
22

33
import inquirer from "inquirer"
4-
import Nightmare from "nightmare"
54

65
import {prettyPrint} from "../helpers.js"
76

@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413

1514
async function getBalance (options = {}) {
1615
const {
17-
showBrowser = true,
1816
username,
1917
password,
2018
isDevMode = false,
19+
nightmare,
2120
} = options
2221

2322
assert(username)
2423
assert(password)
2524

2625
if (isDevMode) return "1234.56 €"
2726

28-
const nightmare = new Nightmare({show: showBrowser})
2927
const baseUrl = "https://www.mbs.de"
3028
const loginUrl = `${baseUrl}/de/home.html`
3129

scripts/balance/paypal.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import assert from "assert"
22

33
import inquirer from "inquirer"
4-
import Nightmare from "nightmare"
54

65
import {prettyPrint} from "../helpers.js"
76

@@ -32,10 +31,10 @@ const log = process.env.NODE_DEBUG
3231

3332
async function getBalance (options = {}) {
3433
const {
35-
showBrowser = true,
3634
username,
3735
password,
3836
isDevMode = false,
37+
nightmare,
3938
} = options
4039

4140
assert(username)
@@ -45,7 +44,6 @@ async function getBalance (options = {}) {
4544
return ["1234.56 €", "1234.56 €"]
4645
}
4746

48-
const nightmare = new Nightmare({show: showBrowser})
4947
const baseUrl = "https://www.paypal.com"
5048
const balanceURl = "https://www.paypal.com/businessexp/money"
5149
const loginUrl = `${baseUrl}/signin?returnUri=${

scripts/balance/post.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import inquirer from "inquirer"
2-
import Nightmare from "nightmare"
32

43
import {prettyPrint} from "../helpers.js"
54

@@ -11,15 +10,14 @@ const log = process.env.NODE_DEBUG
1110

1211
async function getBalance (options = {}) {
1312
const {
14-
showBrowser = true,
1513
username,
1614
password,
1715
isDevMode,
16+
nightmare,
1817
} = options
1918

2019
if (isDevMode) return "1234.56 €"
2120

22-
const nightmare = new Nightmare({show: showBrowser})
2321
const baseUrl = "https://portokasse.deutschepost.de"
2422

2523

scripts/balances.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ async function main () {
7070
const envYaml = await fse.readFile(envFilePath)
7171
const env = yaml.safeLoad(envYaml)
7272
const config = {
73-
showBrowser: false,
7473
isDevMode: false,
7574
}
7675
const merge = Object.assign

scripts/transactions/dkb-visa.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import fse from "fs-extra"
22

3-
import Nightmare from "nightmare"
4-
import nightmareDownloadManager from "nightmare-inline-download"
53
import yaml from "js-yaml"
64
import { temporaryFile } from "tempy"
75
import converter from "converter"
@@ -17,8 +15,6 @@ import {
1715

1816
const prompt = inquirer.createPromptModule({ output: process.stderr })
1917

20-
nightmareDownloadManager(Nightmare)
21-
2218

2319
function rmEmptyString (key, value) {
2420
return value === ""
@@ -160,10 +156,9 @@ async function getTransactions (options = {}) {
160156
endDate = new Date(),
161157
username,
162158
password,
163-
shallShowBrowser = false,
159+
nightmare,
164160
} = options
165161

166-
const nightmare = new Nightmare({show: shallShowBrowser})
167162
const baseUrl = "https://www.dkb.de"
168163
const filePathTemp = temporaryFile({name: "dkb-transactions.csv"})
169164
const log = process.env.NODE_DEBUG

0 commit comments

Comments
 (0)