File tree Expand file tree Collapse file tree 13 files changed +12
-51
lines changed
Expand file tree Collapse file tree 13 files changed +12
-51
lines changed Original file line number Diff line number Diff line change 11import assert from "assert"
22
33import inquirer from "inquirer"
4- import Nightmare from "nightmare"
54
65import { prettyPrint } from "../helpers.js"
76
@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413
1514async 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
Original file line number Diff line number Diff line change 11import assert from "assert"
22
33import inquirer from "inquirer"
4- import Nightmare from "nightmare"
54
65import { prettyPrint } from "../helpers.js"
76
@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413
1514async 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
Original file line number Diff line number Diff line change 11import assert from "assert"
22
33import inquirer from "inquirer"
4- import Nightmare from "nightmare"
54
65import { prettyPrint } from "../helpers.js"
76
@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413
1514async 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
Original file line number Diff line number Diff line change 11import assert from "assert"
22
33import inquirer from "inquirer"
4- import Nightmare from "nightmare"
54
65import { prettyPrint } from "../helpers.js"
76
@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413
1514async 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
Original file line number Diff line number Diff line change 11import assert from "assert"
22
33import inquirer from "inquirer"
4- import Nightmare from "nightmare"
54
65import { prettyPrint } from "../helpers.js"
76
@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413
1514async 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
Original file line number Diff line number Diff line change 11import assert from "assert"
22
33import inquirer from "inquirer"
4- import Nightmare from "nightmare"
54
65import { prettyPrint } from "../helpers.js"
76
@@ -14,18 +13,17 @@ const log = process.env.NODE_DEBUG
1413
1514async 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
Original file line number Diff line number Diff line change 11import assert from "assert"
22
33import inquirer from "inquirer"
4- import Nightmare from "nightmare"
54
65import { prettyPrint } from "../helpers.js"
76
@@ -32,10 +31,10 @@ const log = process.env.NODE_DEBUG
3231
3332async 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=${
Original file line number Diff line number Diff line change 11import inquirer from "inquirer"
2- import Nightmare from "nightmare"
32
43import { prettyPrint } from "../helpers.js"
54
@@ -11,15 +10,14 @@ const log = process.env.NODE_DEBUG
1110
1211async 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11import fse from "fs-extra"
22
3- import Nightmare from "nightmare"
4- import nightmareDownloadManager from "nightmare-inline-download"
53import yaml from "js-yaml"
64import { temporaryFile } from "tempy"
75import converter from "converter"
@@ -17,8 +15,6 @@ import {
1715
1816const prompt = inquirer . createPromptModule ( { output : process . stderr } )
1917
20- nightmareDownloadManager ( Nightmare )
21-
2218
2319function 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
You can’t perform that action at this time.
0 commit comments