fix(core): update

This commit is contained in:
Philipp Kunz 2019-12-15 17:21:23 +00:00
parent eeb93ef969
commit dc97525de6
5 changed files with 57 additions and 55 deletions

95
package-lock.json generated
View File

@ -70,17 +70,17 @@
} }
}, },
"@gitzone/tstest": { "@gitzone/tstest": {
"version": "1.0.24", "version": "1.0.28",
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftstest/-/tstest-1.0.24.tgz", "resolved": "https://verdaccio.lossless.one/@gitzone%2ftstest/-/tstest-1.0.28.tgz",
"integrity": "sha512-HFHLxhXFhhY7nn7H7dxfjy/6WiUGCw35L5Do/ZajCAn/xAWiqnppW1aIp0LOOaWeZ7J5fH7xP88TjsGpwR+MRA==", "integrity": "sha512-MNXH4hpn/4BRwoCjIxz+fbrpkFw/u8834BFTX4Ug1bU37qBZvwZdyMfHBNRSjDykya3SLjOSqOf1mcMI3gnEvA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@gitzone/tsrun": "^1.2.6", "@gitzone/tsrun": "^1.2.8",
"@pushrocks/consolecolor": "^2.0.1", "@pushrocks/consolecolor": "^2.0.1",
"@pushrocks/smartfile": "^7.0.2", "@pushrocks/smartfile": "^7.0.6",
"@pushrocks/smartlog": "^2.0.19", "@pushrocks/smartlog": "^2.0.19",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.6",
"@pushrocks/smartshell": "^2.0.22", "@pushrocks/smartshell": "^2.0.25",
"@types/figures": "^3.0.1", "@types/figures": "^3.0.1",
"figures": "^3.0.0" "figures": "^3.0.0"
} }
@ -347,21 +347,22 @@
} }
}, },
"@pushrocks/tapbundle": { "@pushrocks/tapbundle": {
"version": "3.0.13", "version": "3.2.0",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.0.13.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2ftapbundle/-/tapbundle-3.2.0.tgz",
"integrity": "sha512-23O4UMBafCuD+RnUlXNvtT9DGbL1HMD+xZE1Zcr7Ll7WvgxUgRQQfk9kq6qbLLbjaRe1J2Ijsgh1HuZbBaucLQ==", "integrity": "sha512-xnKIGe7NJqxWBaFeKIEXShDjV2wap1XJqmlp3m1MKqmIF62vRpZnkzpyE1ZAoNwiYQmIsXIpvP/PDv+iPevPfw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@pushrocks/early": "^3.0.3", "@pushrocks/early": "^3.0.3",
"@pushrocks/smartdelay": "^2.0.3", "@pushrocks/smartdelay": "^2.0.3",
"@pushrocks/smartfile": "^7.0.6",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.2",
"smartchai": "^2.0.1" "smartchai": "^2.0.1"
} }
}, },
"@types/chai": { "@types/chai": {
"version": "4.2.3", "version": "4.2.7",
"resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.3.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fchai/-/chai-4.2.7.tgz",
"integrity": "sha512-VRw2xEGbll3ZiTQ4J02/hUjNqZoue1bMhoo2dgM2LXjDdyaq4q80HgBDHwpI0/VKlo4Eg+BavyQMv/NYgTetzA==", "integrity": "sha512-luq8meHGYwvky0O7u0eQZdA7B4Wd9owUCqvbw2m3XCrCU8mplYOujMBbvyS547AxJkC+pGnd0Cm15eNxEUNU8g==",
"dev": true "dev": true
}, },
"@types/chai-as-promised": { "@types/chai-as-promised": {
@ -435,9 +436,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "10.14.19", "version": "12.12.17",
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-10.14.19.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.12.17.tgz",
"integrity": "sha512-j6Sqt38ssdMKutXBUuAcmWF8QtHW1Fwz/mz4Y+Wd9mzpBiVFirjpNQf363hG5itkG+yGaD+oiLyb50HxJ36l9Q==" "integrity": "sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA=="
}, },
"@types/node-forge": { "@types/node-forge": {
"version": "0.8.6", "version": "0.8.6",
@ -456,9 +457,9 @@
} }
}, },
"@types/which": { "@types/which": {
"version": "1.3.1", "version": "1.3.2",
"resolved": "https://verdaccio.lossless.one/@types%2fwhich/-/which-1.3.1.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fwhich/-/which-1.3.2.tgz",
"integrity": "sha512-ZrJDWpvg75LTGX4XwuneY9s6bF3OeZcGTpoGh3zDV9ytzcHMFsRrMIaLBRJZQMBoGyKs6unBQfVdrLZiYfb1zQ==", "integrity": "sha512-8oDqyLC7eD4HM307boe2QWKyuzdzWBj56xI/imSl2cpL+U3tCMaTAkMJ4ee5JBZ/FsOJlvRGeIShiZDAl1qERA==",
"dev": true "dev": true
}, },
"@types/yargs": { "@types/yargs": {
@ -522,9 +523,9 @@
} }
}, },
"arg": { "arg": {
"version": "4.1.1", "version": "4.1.2",
"resolved": "https://verdaccio.lossless.one/arg/-/arg-4.1.1.tgz", "resolved": "https://verdaccio.lossless.one/arg/-/arg-4.1.2.tgz",
"integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==", "integrity": "sha512-+ytCkGcBtHZ3V2r2Z06AncYO8jz46UEamcspGoU8lHcEbpn6J77QK0vdWvChsclg/tM5XIJC5tnjmPp7Eq6Obg==",
"dev": true "dev": true
}, },
"argparse": { "argparse": {
@ -664,6 +665,12 @@
"wrap-ansi": "^2.0.0" "wrap-ansi": "^2.0.0"
} }
}, },
"clone": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/clone/-/clone-1.0.4.tgz",
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
"dev": true
},
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://verdaccio.lossless.one/code-point-at/-/code-point-at-1.1.0.tgz", "resolved": "https://verdaccio.lossless.one/code-point-at/-/code-point-at-1.1.0.tgz",
@ -694,9 +701,9 @@
} }
}, },
"commander": { "commander": {
"version": "2.20.0", "version": "2.20.3",
"resolved": "https://verdaccio.lossless.one/commander/-/commander-2.20.0.tgz", "resolved": "https://verdaccio.lossless.one/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true "dev": true
}, },
"concat-map": { "concat-map": {
@ -756,14 +763,6 @@
"dev": true, "dev": true,
"requires": { "requires": {
"clone": "^1.0.2" "clone": "^1.0.2"
},
"dependencies": {
"clone": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/clone/-/clone-1.0.4.tgz",
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=",
"dev": true
}
} }
}, },
"delayed-stream": { "delayed-stream": {
@ -842,9 +841,9 @@
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
}, },
"figures": { "figures": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://verdaccio.lossless.one/figures/-/figures-3.0.0.tgz", "resolved": "https://verdaccio.lossless.one/figures/-/figures-3.1.0.tgz",
"integrity": "sha512-HKri+WoWoUgr83pehn/SIgLOMZ9nAWC6dcGj26RY2R4F50u4+RTUz0RCrUlOV3nKRAICW1UGzyb+kcX2qK1S/g==", "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==",
"dev": true, "dev": true,
"requires": { "requires": {
"escape-string-regexp": "^1.0.5" "escape-string-regexp": "^1.0.5"
@ -1356,9 +1355,9 @@
"dev": true "dev": true
}, },
"resolve": { "resolve": {
"version": "1.12.0", "version": "1.13.1",
"resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.12.0.tgz", "resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.13.1.tgz",
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==",
"dev": true, "dev": true,
"requires": { "requires": {
"path-parse": "^1.0.6" "path-parse": "^1.0.6"
@ -1465,9 +1464,9 @@
"dev": true "dev": true
}, },
"source-map-support": { "source-map-support": {
"version": "0.5.13", "version": "0.5.16",
"resolved": "https://verdaccio.lossless.one/source-map-support/-/source-map-support-0.5.13.tgz", "resolved": "https://verdaccio.lossless.one/source-map-support/-/source-map-support-0.5.16.tgz",
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"buffer-from": "^1.0.0", "buffer-from": "^1.0.0",
@ -1541,9 +1540,9 @@
} }
}, },
"ts-node": { "ts-node": {
"version": "8.4.1", "version": "8.5.4",
"resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-8.4.1.tgz", "resolved": "https://verdaccio.lossless.one/ts-node/-/ts-node-8.5.4.tgz",
"integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==", "integrity": "sha512-izbVCRV68EasEPQ8MSIGBNK9dc/4sYJJKYA+IarMQct1RtEot6Xp0bXuClsbUSnKpg50ho+aOAx8en5c+y4OFw==",
"dev": true, "dev": true,
"requires": { "requires": {
"arg": "^4.1.0", "arg": "^4.1.0",
@ -1560,9 +1559,9 @@
"dev": true "dev": true
}, },
"tslint": { "tslint": {
"version": "5.20.0", "version": "5.20.1",
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.20.0.tgz", "resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.20.1.tgz",
"integrity": "sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g==", "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.0.0", "@babel/code-frame": "^7.0.0",

View File

@ -14,11 +14,11 @@
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.0.22",
"@gitzone/tstest": "^1.0.15", "@gitzone/tstest": "^1.0.28",
"@pushrocks/qenv": "^4.0.6", "@pushrocks/qenv": "^4.0.6",
"@pushrocks/tapbundle": "^3.0.7", "@pushrocks/tapbundle": "^3.2.0",
"@types/node": "^10.11.7", "@types/node": "^12.12.17",
"tslint": "^5.11.0", "tslint": "^5.20.1",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.15.0"
}, },
"dependencies": { "dependencies": {

View File

@ -9,7 +9,7 @@ let testBunqAccount: bunq.BunqAccount;
const testBunqOptions: bunq.IBunqConstructorOptions = { const testBunqOptions: bunq.IBunqConstructorOptions = {
apiKey: testQenv.getEnvVarOnDemand('BUNQ_APIKEY'), apiKey: testQenv.getEnvVarOnDemand('BUNQ_APIKEY'),
deviceName: 'mojoiobunqpackage', deviceName: 'mojoiobunqpackage',
environment: 'SANDBOX' environment: 'PRODUCTION'
}; };
tap.test('should create a valid bunq account', async () => { tap.test('should create a valid bunq account', async () => {

View File

@ -89,10 +89,13 @@ export class BunqAccount {
return accountsArray; return accountsArray;
} }
/**
* stops the instance
*/
public async stop() { public async stop() {
if (this.bunqJSClient) { if (this.bunqJSClient) {
this.bunqJSClient.setKeepAlive(false); this.bunqJSClient.setKeepAlive(false);
this.bunqJSClient.destroyApiSession(); await this.bunqJSClient.destroyApiSession();
this.bunqJSClient = null; this.bunqJSClient = null;
} }
} }

View File

@ -4,7 +4,7 @@ import { MonetaryAccount } from './bunq.classes.monetaryaccount';
export class Transaction { export class Transaction {
public static fromApiObject(monetaryAccountRefArg: MonetaryAccount, apiObjectArg: any) { public static fromApiObject(monetaryAccountRefArg: MonetaryAccount, apiObjectArg: any) {
const newTransaction = new this(monetaryAccountRefArg); const newTransaction = new this(monetaryAccountRefArg);
Object.assign(newTransaction, apiObjectArg); Object.assign(newTransaction, apiObjectArg.Payment);
return newTransaction; return newTransaction;
} }