diff --git a/e2e/conf/conf.spec.ts b/e2e/conf/conf.spec.ts deleted file mode 100644 index 6375c23282..0000000000 --- a/e2e/conf/conf.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2018 NEM - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import {Account} from '../../src/model/account/Account'; -import {NetworkType} from '../../src/model/blockchain/NetworkType'; - -export const TestingAccount = Account.createFromPrivateKey( - '26b64cb10f005e5988a36744ca19e20d835ccc7c105aaa5f3b212da593180930', - NetworkType.MIJIN_TEST); - -export const MultisigAccount = Account.createFromPrivateKey( - '5edebfdbeb32e9146d05ffd232c8af2cf9f396caf9954289daa0362d097fff3b', - NetworkType.MIJIN_TEST); - -export const CosignatoryAccount = Account.createFromPrivateKey( - '2a2b1f5d366a5dd5dc56c3c757cf4fe6c66e2787087692cf329d7a49a594658b', - NetworkType.MIJIN_TEST); - -export const Cosignatory2Account = Account.createFromPrivateKey( - 'b8afae6f4ad13a1b8aad047b488e0738a437c7389d4ff30c359ac068910c1d59', - NetworkType.MIJIN_TEST); - -export const Cosignatory3Account = Account.createFromPrivateKey( - '111602be4d36f92dd60ca6a3c68478988578f26f6a02f8c72089839515ab603e', - NetworkType.MIJIN_TEST); - -export const APIUrl = 'http://localhost:3000'; diff --git a/e2e/conf/network.conf b/e2e/conf/network.conf new file mode 100644 index 0000000000..8599bb6803 --- /dev/null +++ b/e2e/conf/network.conf @@ -0,0 +1,53 @@ +{ + "apiUrl": "http://localhost:3000", + "testAccount": { + "privateKey": "D242FB34C2C4DD36E995B9C865F93940065E326661BA5A4A247331D211FE3A3D", + "address": "SBMYYFIM6VGG45KWGSZLSXFHP74WVT7MOF6UYBHT", + "publicKey": "2FC3872A792933617D70E02AFF8FBDE152821A0DF0CA5FB04CB56FC3D21C8863" + }, + "multisigAccount": { + "privateKey": "6EBE2AB0584C816771B494B36B40EC6CE1A0024C37DC6056D89D570A21A70262", + "address": "SCJAK5N6ICIE3JGHV5SVDSSNM5RUZZVDWQJ5G76N", + "publicKey": "224556169645EFAB772BFE1B5665490334428017E5D86FB3C9DFC4070B2F16A6" + }, + "cosignatoryAccount": { + "privateKey": "44C0044B36AEF44C7743C407CEE4B6FD801BF6B0652AB7799B0991FFD3A81E71", + "address": "SCPL4YCGZYCML5WUSCIVN5MQF5YZAAF4GMZJIEL4", + "publicKey": "76C1622C7FB58986E500228E8FFB30C606CAAFC1CD78E770E82C73DAB7BD7C9F" + }, + "cosignatory2Account": { + "privateKey": "F7B3A64652BAE6DB00D8B7C45F9D1C9BE0DB9E02002111A0B547AE1E220B7DDC", + "address": "SBISV4QCGJ7SSOLG64DBNPWU6J7SSY64R22D2L3Q", + "publicKey": "B5C2611E32E16482B0B9811ABF906A1DE84184DED1D343790482F517C02FB01C" + }, + "cosignatory3Account": { + "privateKey": "A7D6ED74CDDECBF621DDC63558433DB604FA800D138810B3DF9B4EC880D0705F", + "address": "SD2UY5LHIAAZDVKRHBOYSS4MTLHVTJVUTQPEGV2U", + "publicKey": "3A33DA75E00F643C49C57E8BD3282149911B06FF107C37F7AEDFED5532166BDA" + }, + "cosignatory4Account": { + "privateKey": "D2A12301F5595869EFD5374B3372F0ED7EC26BF73A71D310950CC018D3FA0B03", + "address": "SD7PYMM2BTT4SGSITZ2MBQBK4SXIQQQV4ZOP46VF", + "publicKey": "FDE589878756C2287056EC8D7B2829D9C1FA6D389EBDC808034813FE7810AAB0" + }, + "testAccount2": { + "privateKey": "E5DCCEBDB01A8B03A7DB7BA5888E2E33FD4617B5F6FED48C4C09C0780F422713", + "address": "SBSBLBT7CIOQG6XUI7TRDMHV4TKS5O7QM3MWQYHL", + "publicKey": "5F14CD455A1C0B08073C657EFA09365921736C1ADAF0F0685848678AE966EE09" + }, + "testAccount3": { + "privateKey": "CA95470BEFF4487D692D501E5C41F86FAE9CE6DD15B7B64E150E42A18BDE9CF8", + "address": "SBCFDASM35I6JSLUPQMSX2WGJG55WOCNB53NNVPH", + "publicKey": "E97077A656D9E7F5679880D4950BBF2B3638B7ACE17C82CCB7881DE9BAF396C6" + }, + "testAccountNoBalance": { + "privateKey": "A0591F79F588758280DFB4823A47FCEEC6A551344F794FFDE3760A9D7E1DE348", + "address": "SC5NTT5APX2FAUS4VQUII3UTMAD7GHRFTLDQOEDW", + "publicKey": "6D652E480E5B2997A19D0C7485724693D79A63FCD591A948B40240BD196BA7D6" + }, + "harvestingAccount": { + "privateKey": "0B9802C011DA2D61BCD203F4DC76C012898EE38BA54A7E030B86630A8FD43CA6", + "address": "SAALWHKCWH72J53M3M4LB6UYFGLQMAOXJACWJX2U", + "publicKey": "092CAAFEBCB51C64A7CE423050964492407B264CA306D063DBA927A2304C4DD8" + } +} diff --git a/e2e/infrastructure/AccountHttp.spec.ts b/e2e/infrastructure/AccountHttp.spec.ts index ee00debece..b5d61a81b6 100644 --- a/e2e/infrastructure/AccountHttp.spec.ts +++ b/e2e/infrastructure/AccountHttp.spec.ts @@ -14,24 +14,97 @@ * limitations under the License. */ -import {expect} from 'chai'; +import {deepEqual} from 'assert'; +import {assert, expect} from 'chai'; import {AccountHttp} from '../../src/infrastructure/AccountHttp'; +import { Listener, TransactionHttp } from '../../src/infrastructure/infrastructure'; import {QueryParams} from '../../src/infrastructure/QueryParams'; +import { Account } from '../../src/model/account/Account'; import {Address} from '../../src/model/account/Address'; +import { PropertyModificationType } from '../../src/model/account/PropertyModificationType'; +import { PropertyType } from '../../src/model/account/PropertyType'; import {PublicAccount} from '../../src/model/account/PublicAccount'; import {NetworkType} from '../../src/model/blockchain/NetworkType'; - -import {APIUrl} from '../conf/conf.spec'; +import { NetworkCurrencyMosaic } from '../../src/model/mosaic/NetworkCurrencyMosaic'; +import { AccountPropertyModification } from '../../src/model/transaction/AccountPropertyModification'; +import { AccountPropertyTransaction } from '../../src/model/transaction/AccountPropertyTransaction'; +import { Deadline } from '../../src/model/transaction/Deadline'; +import { ModifyMultisigAccountTransaction } from '../../src/model/transaction/ModifyMultisigAccountTransaction'; +import { MultisigCosignatoryModification } from '../../src/model/transaction/MultisigCosignatoryModification'; +import { MultisigCosignatoryModificationType } from '../../src/model/transaction/MultisigCosignatoryModificationType'; +import { PlainMessage } from '../../src/model/transaction/PlainMessage'; +import { TransferTransaction } from '../../src/model/transaction/TransferTransaction'; describe('AccountHttp', () => { - const accountAddress = Address.createFromRawAddress('SDRDGFTDLLCB67D4HPGIMIHPNSRYRJRT7DOBGWZY'); - const accountPublicKey = '1026D70E1954775749C6811084D6450A3184D977383F0E4282CD47118AF37755'; - const publicAccount = PublicAccount.createFromPublicKey('846B4439154579A5903B1459C9CF69CB8153F6D0110A7A0ED61DE29AE4810BF2', - NetworkType.MIJIN_TEST); - const multisigPublicAccount = PublicAccount.createFromPublicKey('B694186EE4AB0558CA4AFCFDD43B42114AE71094F5A1FC4A913FE9971CACD21D', - NetworkType.MIJIN_TEST); + let account: Account; + let account2: Account; + let account3: Account; + let multisigAccount: Account; + let cosignAccount1: Account; + let cosignAccount2: Account; + let cosignAccount3: Account; + let accountAddress: Address; + let accountPublicKey: string; + let publicAccount: PublicAccount; + let accountHttp: AccountHttp; + let transactionHttp: TransactionHttp; + let config; - const accountHttp = new AccountHttp(APIUrl); + before((done) => { + const path = require('path'); + require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { + if (err) { + throw err; + } + const json = JSON.parse(data); + config = json; + account = Account.createFromPrivateKey(json.testAccount.privateKey, NetworkType.MIJIN_TEST); + account2 = Account.createFromPrivateKey(json.testAccount2.privateKey, NetworkType.MIJIN_TEST); + account3 = Account.createFromPrivateKey(json.testAccount3.privateKey, NetworkType.MIJIN_TEST); + multisigAccount = Account.createFromPrivateKey(json.multisigAccount.privateKey, NetworkType.MIJIN_TEST); + cosignAccount1 = Account.createFromPrivateKey(json.cosignatoryAccount.privateKey, NetworkType.MIJIN_TEST); + cosignAccount2 = Account.createFromPrivateKey(json.cosignatory2Account.privateKey, NetworkType.MIJIN_TEST); + cosignAccount3 = Account.createFromPrivateKey(json.cosignatory3Account.privateKey, NetworkType.MIJIN_TEST); + accountAddress = Address.createFromRawAddress(json.testAccount.address); + accountPublicKey = json.testAccount.publicKey; + publicAccount = PublicAccount.createFromPublicKey(json.testAccount.publicKey, NetworkType.MIJIN_TEST); + + accountHttp = new AccountHttp(json.apiUrl); + transactionHttp = new TransactionHttp(json.apiUrl); + done(); + }); + }); + describe('TransferTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + + it('standalone', (done) => { + const transferTransaction = TransferTransaction.create( + Deadline.create(), + account2.address, + [NetworkCurrencyMosaic.createAbsolute(1)], + PlainMessage.create('test-message'), + NetworkType.MIJIN_TEST, + ); + const signedTransaction = transferTransaction.signWith(account); + + listener.confirmed(account.address).subscribe((transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); describe('getAccountInfo', () => { it('should return account data given a NEM Address', (done) => { @@ -53,41 +126,148 @@ describe('AccountHttp', () => { }); }); - describe('getMultisigAccountInfo', () => { - it('should call getMultisigAccountInfo successfully', (done) => { - accountHttp.getMultisigAccountInfo(multisigPublicAccount.address).subscribe((multisigAccountInfo) => { - expect(multisigAccountInfo.account.publicKey).to.be.equal(multisigPublicAccount.publicKey); + describe('AccountPropertyTransaction - Address', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + + it('add properties', (done) => { + const addressPropertyFilter = AccountPropertyModification.createForAddress( + PropertyModificationType.Add, + account3.address, + ); + const addressModification = AccountPropertyTransaction.createAddressPropertyModificationTransaction( + Deadline.create(), + PropertyType.BlockAddress, + [addressPropertyFilter], + NetworkType.MIJIN_TEST, + ); + const signedTransaction = addressModification.signWith(account); + + listener.confirmed(account.address).subscribe((transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); done(); }); + transactionHttp.announce(signedTransaction); }); }); describe('getAccountProperty', () => { it('should call getAccountProperty successfully', (done) => { - accountHttp.getAccountProperty(publicAccount).subscribe((accountProperty) => { - expect(accountProperty.accountProperties[0]!.address).to.be.equal(accountAddress); - done(); - }); + setTimeout(() => { + accountHttp.getAccountProperties(accountAddress).subscribe((accountProperty) => { + deepEqual(accountProperty.accountProperties.address, accountAddress); + done(); + }); + }, 1000); }); }); describe('getAccountProperties', () => { it('should call getAccountProperties successfully', (done) => { - accountHttp.getAccountProperties([accountAddress]).subscribe((accountProperties) => { - expect(accountProperties[0]!.accountProperties[0]!.address).to.be.equal(accountAddress); + setTimeout(() => { + accountHttp.getAccountPropertiesFromAccounts([accountAddress]).subscribe((accountProperties) => { + deepEqual(accountProperties[0]!.accountProperties.address, accountAddress); + done(); + }); + }, 1000); + }); + }); + describe('AccountPropertyTransaction - Address', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + + it('remove properties', (done) => { + const addressPropertyFilter = AccountPropertyModification.createForAddress( + PropertyModificationType.Remove, + account3.address, + ); + const addressModification = AccountPropertyTransaction.createAddressPropertyModificationTransaction( + Deadline.create(), + PropertyType.BlockAddress, + [addressPropertyFilter], + NetworkType.MIJIN_TEST, + ); + const signedTransaction = addressModification.signWith(account); + + listener.confirmed(account.address).subscribe((transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); done(); }); + transactionHttp.announce(signedTransaction); }); }); - describe('getMultisigAccountGraphInfo', () => { - it('should call getMultisigAccountGraphInfo successfully', (done) => { - accountHttp.getMultisigAccountGraphInfo(multisigPublicAccount.address).subscribe((multisigAccountGraphInfo) => { - expect(multisigAccountGraphInfo.multisigAccounts.get(0)![0].account.publicKey).to.be.equal(multisigPublicAccount.publicKey); + describe('ModifyMultisigAccountTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('ModifyMultisigAccountTransaction', (done) => { + const modifyMultisigAccountTransaction = ModifyMultisigAccountTransaction.create( + Deadline.create(), + 2, + 1, + [ new MultisigCosignatoryModification(MultisigCosignatoryModificationType.Add, cosignAccount1.publicAccount), + new MultisigCosignatoryModification(MultisigCosignatoryModificationType.Add, cosignAccount2.publicAccount), + new MultisigCosignatoryModification(MultisigCosignatoryModificationType.Add, cosignAccount3.publicAccount), + ], + NetworkType.MIJIN_TEST, + ); + const signedTransaction = multisigAccount.sign(modifyMultisigAccountTransaction); + listener.confirmed(multisigAccount.address).subscribe((transaction) => { + done(); + }); + listener.status(multisigAccount.address).subscribe((error) => { + console.log('Error:', error); done(); }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('getMultisigAccountGraphInfo', () => { + it('should call getMultisigAccountGraphInfo successfully', (done) => { + setTimeout(() => { + accountHttp.getMultisigAccountGraphInfo(multisigAccount.address).subscribe((multisigAccountGraphInfo) => { + expect(multisigAccountGraphInfo.multisigAccounts.get(0)![0]. + account.publicKey).to.be.equal(multisigAccount.publicKey); + done(); + }); + }, 1000); + }); + }); + describe('getMultisigAccountInfo', () => { + it('should call getMultisigAccountInfo successfully', (done) => { + setTimeout(() => { + accountHttp.getMultisigAccountInfo(multisigAccount.address).subscribe((multisigAccountInfo) => { + expect(multisigAccountInfo.account.publicKey).to.be.equal(multisigAccount.publicKey); + done(); + }); + }, 1000); }); }); - describe('incomingTransactions', () => { it('should call incomingTransactions successfully', (done) => { accountHttp.incomingTransactions(publicAccount).subscribe((transactions) => { @@ -98,28 +278,9 @@ describe('AccountHttp', () => { }); describe('outgoingTransactions', () => { - let nextId: string; - let lastId: string; - it('should call outgoingTransactions successfully', (done) => { accountHttp.outgoingTransactions(publicAccount).subscribe((transactions) => { - expect(transactions.length).to.be.equal(10); - done(); - }); - }); - it('should call outgoingTransactions successfully pageSize 11', (done) => { - accountHttp.outgoingTransactions(publicAccount, new QueryParams(22)).subscribe((transactions) => { - expect(transactions.length).to.be.equal(22); - nextId = transactions[10].transactionInfo!.id; - lastId = transactions[11].transactionInfo!.id; - done(); - }); - }); - - it('should call outgoingTransactions successfully pageSize 11 and next id', (done) => { - accountHttp.outgoingTransactions(publicAccount, new QueryParams(11, nextId)).subscribe((transactions) => { - expect(transactions.length).to.be.equal(11); - expect(transactions[0].transactionInfo!.id).to.be.equal(lastId); + expect(transactions.length).to.be.greaterThan(0); done(); }); }); @@ -128,8 +289,10 @@ describe('AccountHttp', () => { describe('aggregateBondedTransactions', () => { it('should call aggregateBondedTransactions successfully', (done) => { accountHttp.aggregateBondedTransactions(publicAccount).subscribe((transactions) => { - expect(transactions.length).to.be.equal(0); done(); + }, (error) => { + console.log('Error:', error); + assert(false); }); }); }); diff --git a/e2e/infrastructure/BlockchainHttp.spec.ts b/e2e/infrastructure/BlockchainHttp.spec.ts index a1f478e3c8..c61900bdc7 100644 --- a/e2e/infrastructure/BlockchainHttp.spec.ts +++ b/e2e/infrastructure/BlockchainHttp.spec.ts @@ -17,11 +17,19 @@ import {expect} from 'chai'; import {BlockchainHttp} from '../../src/infrastructure/BlockchainHttp'; import {QueryParams} from '../../src/infrastructure/QueryParams'; -import {APIUrl} from '../conf/conf.spec'; - describe('BlockchainHttp', () => { - const blockchainHttp = new BlockchainHttp(APIUrl); - + let blockchainHttp: BlockchainHttp; + before((done) => { + const path = require('path'); + require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { + if (err) { + throw err; + } + const json = JSON.parse(data); + blockchainHttp = new BlockchainHttp(json.apiUrl); + done(); + }); + }); describe('getBlockByHeight', () => { it('should return block info given height', (done) => { blockchainHttp.getBlockByHeight(1) @@ -63,11 +71,7 @@ describe('BlockchainHttp', () => { it('should return block info given height and limit', (done) => { blockchainHttp.getBlocksByHeightWithLimit(1, 50) .subscribe((blocksInfo) => { - expect(blocksInfo.length).to.be.equal(50); - expect(blocksInfo[49].height.lower).to.be.equal(1); - expect(blocksInfo[49].height.higher).to.be.equal(0); - expect(blocksInfo[49].timestamp.lower).to.be.equal(0); - expect(blocksInfo[49].timestamp.higher).to.be.equal(0); + expect(blocksInfo.length).to.be.greaterThan(0); done(); }); }); diff --git a/e2e/infrastructure/Listener.spec.ts b/e2e/infrastructure/Listener.spec.ts index 9a47b20419..1a5c59a734 100644 --- a/e2e/infrastructure/Listener.spec.ts +++ b/e2e/infrastructure/Listener.spec.ts @@ -13,157 +13,292 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { assert, expect } from 'chai'; import { AccountHttp } from '../../src/infrastructure/AccountHttp'; +import { NamespaceHttp } from '../../src/infrastructure/infrastructure'; import { Listener } from '../../src/infrastructure/Listener'; -import { Address } from '../../src/model/account/Address'; -import * as conf from '../conf/conf.spec'; -import { - APIUrl, Cosignatory2Account, Cosignatory3Account, CosignatoryAccount, MultisigAccount, - TestingAccount, -} from '../conf/conf.spec'; +import { TransactionHttp } from '../../src/infrastructure/TransactionHttp'; +import { Account } from '../../src/model/account/Account'; +import { NetworkType } from '../../src/model/blockchain/NetworkType'; +import { MosaicId } from '../../src/model/mosaic/MosaicId'; +import { NetworkCurrencyMosaic } from '../../src/model/mosaic/NetworkCurrencyMosaic'; +import { NamespaceId } from '../../src/model/namespace/NamespaceId'; +import { Deadline } from '../../src/model/transaction/Deadline'; +import { ModifyMultisigAccountTransaction } from '../../src/model/transaction/ModifyMultisigAccountTransaction'; +import { MultisigCosignatoryModification } from '../../src/model/transaction/MultisigCosignatoryModification'; +import { MultisigCosignatoryModificationType } from '../../src/model/transaction/MultisigCosignatoryModificationType'; import { TransactionUtils } from './TransactionUtils'; describe('Listener', () => { - let account; - let multisigAccount; - let listener: Listener; - before(() => { - account = TestingAccount; - multisigAccount = MultisigAccount; - listener = new Listener(APIUrl); - return listener.open(); - }); + let accountHttp: AccountHttp; + let apiUrl: string; + let transactionHttp: TransactionHttp; + let account: Account; + let account2: Account; + let cosignAccount1: Account; + let cosignAccount2: Account; + let cosignAccount3: Account; + let cosignAccount4: Account; + let multisigAccount: Account; + let networkCurrencyMosaicId: MosaicId; + let namespaceHttp: NamespaceHttp; + let config; - after(() => { - listener.close(); + before((done) => { + const path = require('path'); + require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { + if (err) { + throw err; + } + const json = JSON.parse(data); + config = json; + apiUrl = json.apiUrl; + account = Account.createFromPrivateKey(json.testAccount.privateKey, NetworkType.MIJIN_TEST); + account2 = Account.createFromPrivateKey(json.testAccount2.privateKey, NetworkType.MIJIN_TEST); + multisigAccount = Account.createFromPrivateKey(json.multisigAccount.privateKey, NetworkType.MIJIN_TEST); + cosignAccount1 = Account.createFromPrivateKey(json.cosignatoryAccount.privateKey, NetworkType.MIJIN_TEST); + cosignAccount2 = Account.createFromPrivateKey(json.cosignatory2Account.privateKey, NetworkType.MIJIN_TEST); + cosignAccount3 = Account.createFromPrivateKey(json.cosignatory3Account.privateKey, NetworkType.MIJIN_TEST); + cosignAccount4 = Account.createFromPrivateKey(json.cosignatory4Account.privateKey, NetworkType.MIJIN_TEST); + transactionHttp = new TransactionHttp(json.apiUrl); + accountHttp = new AccountHttp(json.apiUrl); + namespaceHttp = new NamespaceHttp(json.apiUrl); + done(); + }); }); - it('newBlock', (done) => { - listener.newBlock() - .toPromise() - .then((res) => { + describe('Confirmed', () => { + let listener: Listener; + before (() => { + listener = new Listener(apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('confirmedTransactionsGiven address signer', (done) => { + listener.confirmed(account.address).subscribe((res) => { done(); }); - - TransactionUtils.createAndAnnounce(); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + TransactionUtils.createAndAnnounce(account, account.address, transactionHttp); + }); }); - it('confirmedTransactionsGiven address signer', (done) => { - listener.confirmed(account.address) - .toPromise() - .then((res) => { + describe('Confirmed', () => { + let listener: Listener; + before (() => { + listener = new Listener(apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('confirmedTransactionsGiven address recipient', (done) => { + const recipientAddress = account2.address; + listener.confirmed(recipientAddress).subscribe((res) => { done(); }); - - TransactionUtils.createAndAnnounce(); + listener.status(recipientAddress).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + TransactionUtils.createAndAnnounce(account, recipientAddress, transactionHttp); + }); }); - it('confirmedTransactionsGiven address recipient', (done) => { - const recipientAddress = Address.createFromRawAddress('SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC'); - listener.confirmed(recipientAddress) - .toPromise() - .then((res) => { + describe('UnConfirmed', () => { + let listener: Listener; + before (() => { + listener = new Listener(apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('unconfirmedTransactionsAdded', (done) => { + listener.unconfirmedAdded(account.address).subscribe((res) => { done(); }); - - TransactionUtils.createAndAnnounce(); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + TransactionUtils.createAndAnnounce(account, account.address, transactionHttp); + }); }); - it('unconfirmedTransactionsAdded', (done) => { - listener.unconfirmedAdded(account.address) - .toPromise() - .then((res) => { + describe('UnConfirmed', () => { + let listener: Listener; + before (() => { + listener = new Listener(apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('unconfirmedTransactionsRemoved', (done) => { + listener.unconfirmedAdded(account.address).subscribe((res) => { done(); }); - - setTimeout(() => { - TransactionUtils.createAndAnnounce(); - }, 1000); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + TransactionUtils.createAndAnnounce(account, account.address, transactionHttp); + }); }); - - it('unconfirmedTransactionsRemoved', (done) => { - listener.unconfirmedRemoved(account.address) - .toPromise() - .then((res) => { + describe('Get network currency mosaic id', () => { + it('get mosaicId', (done) => { + namespaceHttp.getLinkedMosaicId(new NamespaceId('cat.currency')).subscribe((networkMosaicId) => { + networkCurrencyMosaicId = networkMosaicId; done(); }); - - setTimeout(() => { - TransactionUtils.createAndAnnounce(); - }, 1000); + }); }); - it('aggregateBondedTransactionsAdded', (done) => { - listener.aggregateBondedAdded(multisigAccount.address) - .toPromise() - .then((res) => { + describe('Aggregate Bonded Transactions', () => { + let listener: Listener; + before (() => { + listener = new Listener(apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregateBondedTransactionsAdded', (done) => { + listener.aggregateBondedAdded(account.address).subscribe((res) => { + done(); + }); + listener.confirmed(account.address).subscribe((res) => { + TransactionUtils.announceAggregateBoundedTransaction(signedAggregatedTx, transactionHttp); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); done(); }); + const signedAggregatedTx = TransactionUtils.createSignedAggregatedBondTransaction(multisigAccount, account, account2.address); - setTimeout(() => { - TransactionUtils.createAggregateBoundedTransactionAndAnnounce(); - }, 1000); + TransactionUtils.createHashLockTransactionAndAnnounce(signedAggregatedTx, account, networkCurrencyMosaicId, transactionHttp ); + }); }); - - it('aggregateBondedTransactionsRemoved', (done) => { - listener.aggregateBondedRemoved(multisigAccount.address) - .toPromise() - .then((res) => { + describe('Aggregate Bonded Transactions', () => { + let listener: Listener; + before (() => { + listener = new Listener(apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregateBondedTransactionsRemoved', (done) => { + listener.confirmed(cosignAccount1.address).subscribe((res) => { + listener.aggregateBondedRemoved(cosignAccount1.address).subscribe((res) => { + done(); + }); + listener.aggregateBondedAdded(cosignAccount1.address).subscribe((res) => { + accountHttp.aggregateBondedTransactions(cosignAccount1.publicAccount).subscribe((transactions) => { + const transactionToCosign = transactions[0]; + TransactionUtils.cosignTransaction(transactionToCosign, cosignAccount2, transactionHttp); + }); + }); + listener.status(cosignAccount1.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + TransactionUtils.announceAggregateBoundedTransaction(signedAggregatedTx, transactionHttp); + }); + listener.status(cosignAccount1.address).subscribe((error) => { + console.log('Error:', error); + assert(false); done(); }); + const signedAggregatedTx = + TransactionUtils.createSignedAggregatedBondTransaction(multisigAccount, cosignAccount1, account2.address); - setTimeout(() => { - TransactionUtils.createAggregateBoundedTransactionAndAnnounce(); - setTimeout(() => { - new AccountHttp(conf.APIUrl).aggregateBondedTransactions(CosignatoryAccount.publicAccount).subscribe((transactions) => { - const transactionToCosign = transactions[0]; - TransactionUtils.cosignTransaction(transactionToCosign, Cosignatory2Account); - TransactionUtils.cosignTransaction(transactionToCosign, Cosignatory3Account); - }); - }, 2000); - }, 1000); + TransactionUtils. + createHashLockTransactionAndAnnounce(signedAggregatedTx, cosignAccount1, networkCurrencyMosaicId, transactionHttp ); + }); }); - it('cosignatureAdded', (done) => { - listener.cosignatureAdded(multisigAccount.address) - .toPromise() - .then((res) => { + describe('Aggregate Bonded Transactions', () => { + let listener: Listener; + before (() => { + listener = new Listener(apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('cosignatureAdded', (done) => { + listener.cosignatureAdded(cosignAccount1.address).subscribe((res) => { done(); }); - - setTimeout(() => { - TransactionUtils.createAggregateBoundedTransactionAndAnnounce(); - setTimeout(() => { - new AccountHttp(conf.APIUrl).aggregateBondedTransactions(CosignatoryAccount.publicAccount).subscribe((transactions) => { + listener.aggregateBondedAdded(cosignAccount1.address).subscribe((res) => { + accountHttp.aggregateBondedTransactions(cosignAccount1.publicAccount).subscribe((transactions) => { const transactionToCosign = transactions[0]; - TransactionUtils.cosignTransaction(transactionToCosign, Cosignatory2Account); + TransactionUtils.cosignTransaction(transactionToCosign, cosignAccount2, transactionHttp); }); - }, 1000); - }, 1000); - }); - - it('transactionStatusGiven', (done) => { - listener.status(account.address) - .toPromise() - .then((res) => { + }); + listener.confirmed(cosignAccount1.address).subscribe((res) => { + TransactionUtils.announceAggregateBoundedTransaction(signedAggregatedTx, transactionHttp); + }); + listener.status(cosignAccount1.address).subscribe((error) => { + console.log('Error:', error); + assert(false); done(); }); + const signedAggregatedTx = + TransactionUtils.createSignedAggregatedBondTransaction(multisigAccount, cosignAccount1, account2.address); - setTimeout(() => { - TransactionUtils.createAndAnnounceWithInsufficientBalance(); - }, 1000); + TransactionUtils. + createHashLockTransactionAndAnnounce(signedAggregatedTx, cosignAccount1, networkCurrencyMosaicId, transactionHttp ); + }); }); - it('multisigAccountAdded', (done) => { - listener.multisigAccountAdded(account.address) - .toPromise() - .then((res) => { + describe('Transactions Status', () => { + let listener: Listener; + before (() => { + listener = new Listener(apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('transactionStatusGiven', (done) => { + listener.status(account.address).subscribe((error) => { + expect(error.status).to.be.equal('Failure_Core_Insufficient_Balance'); done(); }); + const mosaics = [NetworkCurrencyMosaic.createRelative(1000000000000)]; + TransactionUtils.createAndAnnounce(account, account2.address, transactionHttp, mosaics); + }); + }); - setTimeout(() => { - TransactionUtils.createModifyMultisigAccountTransaction(account); - }, 1000); + describe('New Block', () => { + let listener: Listener; + before (() => { + listener = new Listener(apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('newBlock', (done) => { + listener.newBlock().subscribe((res) => { + done(); + }); + TransactionUtils.createAndAnnounce(account, account.address, transactionHttp); + }); }); }); diff --git a/e2e/infrastructure/MosaicHttp.spec.ts b/e2e/infrastructure/MosaicHttp.spec.ts index 90b878652c..454bdbe6b6 100644 --- a/e2e/infrastructure/MosaicHttp.spec.ts +++ b/e2e/infrastructure/MosaicHttp.spec.ts @@ -14,26 +14,77 @@ * limitations under the License. */ import {expect} from 'chai'; +import { Listener, TransactionHttp } from '../../src/infrastructure/infrastructure'; import {MosaicHttp} from '../../src/infrastructure/MosaicHttp'; +import { Account } from '../../src/model/account/Account'; +import { NetworkType } from '../../src/model/blockchain/NetworkType'; import {MosaicId} from '../../src/model/mosaic/MosaicId'; +import { MosaicNonce } from '../../src/model/mosaic/MosaicNonce'; +import { MosaicProperties } from '../../src/model/mosaic/MosaicProperties'; import {NamespaceId} from '../../src/model/namespace/NamespaceId'; -import {APIUrl} from '../conf/conf.spec'; +import { Deadline } from '../../src/model/transaction/Deadline'; +import { MosaicDefinitionTransaction } from '../../src/model/transaction/MosaicDefinitionTransaction'; describe('MosaicHttp', () => { - const mosaicId = new MosaicId([3646934825, 3576016193]); - const namespaceId = new NamespaceId([929036875, 2226345261]); - const mosaicHttp = new MosaicHttp(APIUrl); - + let mosaicId: MosaicId; + let mosaicHttp: MosaicHttp; + let account: Account; + let config; + let transactionHttp: TransactionHttp; + before((done) => { + const path = require('path'); + require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { + if (err) { + throw err; + } + const json = JSON.parse(data); + config = json; + account = Account.createFromPrivateKey(json.testAccount.privateKey, NetworkType.MIJIN_TEST); + mosaicHttp = new MosaicHttp(json.apiUrl); + transactionHttp = new TransactionHttp(json.apiUrl); + done(); + }); + }); + describe('MosaicDefinitionTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const nonce = MosaicNonce.createRandom(); + mosaicId = MosaicId.createFromNonce(nonce, account.publicAccount); + const mosaicDefinitionTransaction = MosaicDefinitionTransaction.create( + Deadline.create(), + nonce, + mosaicId, + MosaicProperties.create({ + supplyMutable: true, + transferable: true, + levyMutable: true, + divisibility: 3, + }), + NetworkType.MIJIN_TEST, + ); + const signedTransaction = mosaicDefinitionTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction) => { + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); describe('getMosaic', () => { it('should return mosaic given mosaicId', (done) => { mosaicHttp.getMosaic(mosaicId) .subscribe((mosaicInfo) => { - expect(mosaicInfo.height.lower).to.be.equal(1); - expect(mosaicInfo.height.higher).to.be.equal(0); - expect(mosaicInfo.divisibility).to.be.equal(6); - expect(mosaicInfo.isSupplyMutable()).to.be.equal(false); + expect(mosaicInfo.height.lower).not.to.be.null; + expect(mosaicInfo.divisibility).to.be.equal(3); + expect(mosaicInfo.isSupplyMutable()).to.be.equal(true); expect(mosaicInfo.isTransferable()).to.be.equal(true); - expect(mosaicInfo.isLevyMutable()).to.be.equal(false); + expect(mosaicInfo.isLevyMutable()).to.be.equal(true); done(); }); }); @@ -43,12 +94,11 @@ describe('MosaicHttp', () => { it('should return mosaics given array of mosaicIds', (done) => { mosaicHttp.getMosaics([mosaicId]) .subscribe((mosaicInfos) => { - expect(mosaicInfos[0].height.lower).to.be.equal(1); - expect(mosaicInfos[0].height.higher).to.be.equal(0); - expect(mosaicInfos[0].divisibility).to.be.equal(6); - expect(mosaicInfos[0].isSupplyMutable()).to.be.equal(false); + expect(mosaicInfos[0].height.lower).not.to.be.null; + expect(mosaicInfos[0].divisibility).to.be.equal(3); + expect(mosaicInfos[0].isSupplyMutable()).to.be.equal(true); expect(mosaicInfos[0].isTransferable()).to.be.equal(true); - expect(mosaicInfos[0].isLevyMutable()).to.be.equal(false); + expect(mosaicInfos[0].isLevyMutable()).to.be.equal(true); done(); }); }); diff --git a/e2e/infrastructure/NamespaceHttp.spec.ts b/e2e/infrastructure/NamespaceHttp.spec.ts index dfc413f798..428e0001bd 100644 --- a/e2e/infrastructure/NamespaceHttp.spec.ts +++ b/e2e/infrastructure/NamespaceHttp.spec.ts @@ -14,23 +14,106 @@ * limitations under the License. */ import {deepEqual} from 'assert'; -import {expect} from 'chai'; +import {assert, expect} from 'chai'; +import { Listener } from '../../src/infrastructure/infrastructure'; import {NamespaceHttp} from '../../src/infrastructure/NamespaceHttp'; -import {PublicAccount} from '../../src/model/account/PublicAccount'; +import { TransactionHttp } from '../../src/infrastructure/TransactionHttp'; +import { Account } from '../../src/model/account/Account'; import {NetworkType} from '../../src/model/blockchain/NetworkType'; import {NetworkCurrencyMosaic} from '../../src/model/mosaic/NetworkCurrencyMosaic'; -import {NamespaceId} from '../../src/model/namespace/NamespaceId'; -import {APIUrl} from '../conf/conf.spec'; +import { AliasActionType } from '../../src/model/namespace/AliasActionType'; +import { NamespaceId } from '../../src/model/namespace/NamespaceId'; +import { AddressAliasTransaction } from '../../src/model/transaction/AddressAliasTransaction'; +import { Deadline } from '../../src/model/transaction/Deadline'; +import { RegisterNamespaceTransaction } from '../../src/model/transaction/RegisterNamespaceTransaction'; +import { UInt64 } from '../../src/model/UInt64'; describe('NamespaceHttp', () => { - const namespaceId = NetworkCurrencyMosaic.NAMESPACE_ID; - const publicAccount = PublicAccount.createFromPublicKey('B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', - NetworkType.MIJIN_TEST); - const namespaceHttp = new NamespaceHttp(APIUrl); + const defaultNamespaceId = NetworkCurrencyMosaic.NAMESPACE_ID; + let namespaceId: NamespaceId; + let namespaceHttp: NamespaceHttp; + let account: Account; + let config; + let transactionHttp: TransactionHttp; + before((done) => { + const path = require('path'); + require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { + if (err) { + throw err; + } + const json = JSON.parse(data); + config = json; + account = Account.createFromPrivateKey(json.testAccount.privateKey, NetworkType.MIJIN_TEST); + namespaceHttp = new NamespaceHttp(json.apiUrl); + transactionHttp = new TransactionHttp(json.apiUrl); + done(); + }); + }); + describe('RegisterNamespaceTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const namespaceName = 'root-test-namespace-' + Math.floor(Math.random() * 10000); + const registerNamespaceTransaction = RegisterNamespaceTransaction.createRootNamespace( + Deadline.create(), + namespaceName, + UInt64.fromUint(1000), + NetworkType.MIJIN_TEST, + ); + namespaceId = new NamespaceId(namespaceName); + const signedTransaction = registerNamespaceTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('AddressAliasTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + + it('standalone', (done) => { + const addressAliasTransaction = AddressAliasTransaction.create( + Deadline.create(), + AliasActionType.Link, + namespaceId, + account.address, + NetworkType.MIJIN_TEST, + ); + const signedTransaction = addressAliasTransaction.signWith(account); + + listener.confirmed(account.address).subscribe((transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); describe('getNamespace', () => { it('should return namespace data given namepsaceId', (done) => { - namespaceHttp.getNamespace(namespaceId) + namespaceHttp.getNamespace(defaultNamespaceId) .subscribe((namespace) => { expect(namespace.startHeight.lower).to.be.equal(1); expect(namespace.startHeight.higher).to.be.equal(0); @@ -41,10 +124,9 @@ describe('NamespaceHttp', () => { describe('getNamespacesFromAccount', () => { it('should return namespace data given publicKeyNemesis', (done) => { - namespaceHttp.getNamespacesFromAccount(publicAccount.address) + namespaceHttp.getNamespacesFromAccount(account.address) .subscribe((namespaces) => { - expect(namespaces[0].startHeight.lower).to.be.equal(1); - expect(namespaces[0].startHeight.higher).to.be.equal(0); + deepEqual(namespaces[0].owner, account.publicAccount); done(); }); }); @@ -52,10 +134,9 @@ describe('NamespaceHttp', () => { describe('getNamespacesFromAccounts', () => { it('should return namespaces data given publicKeyNemesis', (done) => { - namespaceHttp.getNamespacesFromAccounts([publicAccount.address]) + namespaceHttp.getNamespacesFromAccounts([account.address]) .subscribe((namespaces) => { - expect(namespaces[0].startHeight.lower).to.be.equal(1); - expect(namespaces[0].startHeight.higher).to.be.equal(0); + deepEqual(namespaces[0].owner, account.publicAccount); done(); }); }); @@ -64,9 +145,9 @@ describe('NamespaceHttp', () => { describe('getNamespacesName', () => { it('should return namespace name given array of namespaceIds', (done) => { - namespaceHttp.getNamespacesName([namespaceId]) + namespaceHttp.getNamespacesName([defaultNamespaceId]) .subscribe((namespaceNames) => { - expect(namespaceNames[0].name).to.be.equal('nem'); + expect(namespaceNames[0].name).to.be.equal('currency'); done(); }); }); @@ -74,7 +155,7 @@ describe('NamespaceHttp', () => { describe('getLinkedMosaicId', () => { it('should return mosaicId given currency namespaceId', (done) => { - namespaceHttp.getLinkedMosaicId(namespaceId) + namespaceHttp.getLinkedMosaicId(defaultNamespaceId) .subscribe((mosaicId) => { expect(mosaicId).to.not.be.null; done(); @@ -86,7 +167,7 @@ describe('NamespaceHttp', () => { it('should return address given namespaceId', (done) => { namespaceHttp.getLinkedAddress(namespaceId) .subscribe((address) => { - expect(address).to.be.null; + expect(address.plain()).to.be.equal(account.address.plain()); done(); }); }); diff --git a/e2e/infrastructure/NetworkHttp.spec.ts b/e2e/infrastructure/NetworkHttp.spec.ts index 38597603e4..34d7a78f4d 100644 --- a/e2e/infrastructure/NetworkHttp.spec.ts +++ b/e2e/infrastructure/NetworkHttp.spec.ts @@ -16,10 +16,20 @@ import {expect} from 'chai'; import {NetworkHttp} from '../../src/infrastructure/NetworkHttp'; import {NetworkType} from '../../src/model/blockchain/NetworkType'; -import {APIUrl} from '../conf/conf.spec'; describe('NetworkHttp', () => { - const networkHttp = new NetworkHttp(APIUrl); + let networkHttp: NetworkHttp; + before((done) => { + const path = require('path'); + require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { + if (err) { + throw err; + } + const json = JSON.parse(data); + networkHttp = new NetworkHttp(json.apiUrl); + done(); + }); + }); describe('getNetworkType', () => { it('should return network type', (done) => { diff --git a/e2e/infrastructure/TransactionHttp.spec.ts b/e2e/infrastructure/TransactionHttp.spec.ts index 458129ad37..9dc2f2c0ba 100644 --- a/e2e/infrastructure/TransactionHttp.spec.ts +++ b/e2e/infrastructure/TransactionHttp.spec.ts @@ -13,30 +13,42 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {expect} from 'chai'; +import {assert, expect} from 'chai'; import * as CryptoJS from 'crypto-js'; import {ChronoUnit} from 'js-joda'; import {keccak_256, sha3_256} from 'js-sha3'; import {convert, nacl_catapult} from 'nem2-library'; import {AccountHttp} from '../../src/infrastructure/AccountHttp'; +import { NamespaceHttp } from '../../src/infrastructure/infrastructure'; import {Listener} from '../../src/infrastructure/Listener'; import {TransactionHttp} from '../../src/infrastructure/TransactionHttp'; import {Account} from '../../src/model/account/Account'; import {Address} from '../../src/model/account/Address'; +import { PropertyModificationType } from '../../src/model/account/PropertyModificationType'; +import { PropertyType } from '../../src/model/account/PropertyType'; import {PublicAccount} from '../../src/model/account/PublicAccount'; import {NetworkType} from '../../src/model/blockchain/NetworkType'; +import { Mosaic } from '../../src/model/mosaic/Mosaic'; import {MosaicId} from '../../src/model/mosaic/MosaicId'; import {MosaicNonce} from '../../src/model/mosaic/MosaicNonce'; import {MosaicProperties} from '../../src/model/mosaic/MosaicProperties'; import {MosaicSupplyType} from '../../src/model/mosaic/MosaicSupplyType'; import {NetworkCurrencyMosaic} from '../../src/model/mosaic/NetworkCurrencyMosaic'; +import { AliasActionType } from '../../src/model/namespace/AliasActionType'; +import { NamespaceId } from '../../src/model/namespace/NamespaceId'; +import { AccountLinkTransaction } from '../../src/model/transaction/AccountLinkTransaction'; +import { AccountPropertyModification } from '../../src/model/transaction/AccountPropertyModification'; +import { AccountPropertyTransaction } from '../../src/model/transaction/AccountPropertyTransaction'; +import { AddressAliasTransaction } from '../../src/model/transaction/AddressAliasTransaction'; import {AggregateTransaction} from '../../src/model/transaction/AggregateTransaction'; import {CosignatureSignedTransaction} from '../../src/model/transaction/CosignatureSignedTransaction'; import {CosignatureTransaction} from '../../src/model/transaction/CosignatureTransaction'; import {Deadline} from '../../src/model/transaction/Deadline'; import {HashType} from '../../src/model/transaction/HashType'; +import { LinkAction } from '../../src/model/transaction/LinkAction'; import {LockFundsTransaction} from '../../src/model/transaction/LockFundsTransaction'; import {ModifyMultisigAccountTransaction} from '../../src/model/transaction/ModifyMultisigAccountTransaction'; +import { MosaicAliasTransaction } from '../../src/model/transaction/MosaicAliasTransaction'; import {MosaicDefinitionTransaction} from '../../src/model/transaction/MosaicDefinitionTransaction'; import {MosaicSupplyChangeTransaction} from '../../src/model/transaction/MosaicSupplyChangeTransaction'; import {MultisigCosignatoryModification} from '../../src/model/transaction/MultisigCosignatoryModification'; @@ -50,673 +62,1503 @@ import {Transaction} from '../../src/model/transaction/Transaction'; import {TransactionType} from '../../src/model/transaction/TransactionType'; import {TransferTransaction} from '../../src/model/transaction/TransferTransaction'; import {UInt64} from '../../src/model/UInt64'; -import {APIUrl, Cosignatory2Account, CosignatoryAccount, MultisigAccount, TestingAccount} from '../conf/conf.spec'; -import * as conf from '../conf/conf.spec'; describe('TransactionHttp', () => { + let transactionHash; + let transactionId; + let account: Account; let account2: Account; + let account3: Account; + let testAccountNoBalance: Account; + let harvestingAccount: Account; let transactionHttp: TransactionHttp; - let accountHttp: AccountHttp; - let namespaceName: string; + let multisigAccount: Account; + let cosignAccount1: Account; + let cosignAccount2: Account; + let cosignAccount3: Account; let mosaicId: MosaicId; - let listener: Listener; - const transactionHash = 'A192621335D733351A7035644F87338B0B9E36B3FAE61253E230B1A0D8BEA332'; - const transactionId = '5A2139FC9CD1E80001573357'; + let namespaceId: NamespaceId; + let networkCurrencyMosaicId: MosaicId; + let accountHttp: AccountHttp; + let namespaceHttp: NamespaceHttp; + let config; + const secureRandom = require('secure-random'); + const sha256 = require('js-sha256'); + const ripemd160 = require('ripemd160'); - before(() => { - account = TestingAccount; - account2 = CosignatoryAccount; - transactionHttp = new TransactionHttp(APIUrl); - accountHttp = new AccountHttp(conf.APIUrl); - listener = new Listener(APIUrl); - return listener.open(); + before((done) => { + const path = require('path'); + require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { + if (err) { + throw err; + } + const json = JSON.parse(data); + config = json; + account = Account.createFromPrivateKey(json.testAccount.privateKey, NetworkType.MIJIN_TEST); + account2 = Account.createFromPrivateKey(json.testAccount2.privateKey, NetworkType.MIJIN_TEST); + account3 = Account.createFromPrivateKey(json.testAccount3.privateKey, NetworkType.MIJIN_TEST); + testAccountNoBalance = Account.createFromPrivateKey(json.testAccountNoBalance.privateKey, NetworkType.MIJIN_TEST); + harvestingAccount = Account.createFromPrivateKey(json.harvestingAccount.privateKey, NetworkType.MIJIN_TEST); + multisigAccount = Account.createFromPrivateKey(json.multisigAccount.privateKey, NetworkType.MIJIN_TEST); + cosignAccount1 = Account.createFromPrivateKey(json.cosignatoryAccount.privateKey, NetworkType.MIJIN_TEST); + cosignAccount2 = Account.createFromPrivateKey(json.cosignatory2Account.privateKey, NetworkType.MIJIN_TEST); + cosignAccount3 = Account.createFromPrivateKey(json.cosignatory3Account.privateKey, NetworkType.MIJIN_TEST); + accountHttp = new AccountHttp(json.apiUrl); + transactionHttp = new TransactionHttp(json.apiUrl); + namespaceHttp = new NamespaceHttp(json.apiUrl); + done(); + }); }); - - const validateTransactionAnnounceCorrectly = (address: Address, done) => { - listener.confirmed(address).subscribe((transaction: Transaction) => { - return done(); + describe('Get network currency mosaic id', () => { + it('get mosaicId', (done) => { + namespaceHttp.getLinkedMosaicId(new NamespaceId('cat.currency')).subscribe((networkMosaicId) => { + networkCurrencyMosaicId = networkMosaicId; + done(); + }); }); - }; - - const validatePartialTransactionAnnounceCorrectly = (address: Address, done) => { - listener.aggregateBondedAdded(address).subscribe((transaction: Transaction) => { - return done(); + }); + describe('MosaicDefinitionTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); }); - }; - - const validateCosignaturePartialTransactionAnnounceCorrectly = (address: Address, publicKey, done) => { - listener.cosignatureAdded(address).subscribe((signature) => { - if (signature.signer === publicKey) { - return done(); - } + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const nonce = MosaicNonce.createRandom(); + mosaicId = MosaicId.createFromNonce(nonce, account.publicAccount); + const mosaicDefinitionTransaction = MosaicDefinitionTransaction.create( + Deadline.create(), + nonce, + mosaicId, + MosaicProperties.create({ + supplyMutable: true, + transferable: true, + levyMutable: true, + divisibility: 3, + }), + NetworkType.MIJIN_TEST, + ); + const signedTransaction = mosaicDefinitionTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('MosaicDefinitionTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const nonce = MosaicNonce.createRandom(); + const mosaicDefinitionTransaction = MosaicDefinitionTransaction.create( + Deadline.create(), + nonce, + MosaicId.createFromNonce(nonce, account.publicAccount), + MosaicProperties.create({ + supplyMutable: true, + transferable: true, + levyMutable: true, + divisibility: 3, + }), + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [mosaicDefinitionTransaction.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + []); + const signedTransaction = aggregateTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('TransferTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); }); - }; - describe('announce', () => { - describe('TransferTransaction', () => { + it('standalone', (done) => { const transferTransaction = TransferTransaction.create( Deadline.create(), - Address.createFromRawAddress('SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC'), - [NetworkCurrencyMosaic.createRelative(10)], + account2.address, + [NetworkCurrencyMosaic.createAbsolute(1)], PlainMessage.create('test-message'), NetworkType.MIJIN_TEST, ); - it('standalone', (done) => { - const signedTransaction = transferTransaction.signWith(account); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(signedTransaction); + const signedTransaction = transferTransaction.signWith(account); + + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); }); - it('aggregate', (done) => { - const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), - [transferTransaction.toAggregate(account.publicAccount)], - NetworkType.MIJIN_TEST, - [], - ); - const signedTransaction = aggregateTransaction.signWith(account); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(signedTransaction); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('TransferTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const transferTransaction = TransferTransaction.create( + Deadline.create(), + account2.address, + [NetworkCurrencyMosaic.createAbsolute(1)], + PlainMessage.create('test-message'), + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [transferTransaction.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + [], + ); + const signedTransaction = aggregateTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('AccountPropertyTransaction - Address', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); }); - describe('RegisterNamespaceTransaction', () => { - it('standalone', (done) => { - namespaceName = 'root-test-namespace-' + Math.floor(Math.random() * 10000); - const registerNamespaceTransaction = RegisterNamespaceTransaction.createRootNamespace( - Deadline.create(), - namespaceName, - UInt64.fromUint(1000), - NetworkType.MIJIN_TEST, - ); - const signedTransaction = registerNamespaceTransaction.signWith(account); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(signedTransaction); + it('standalone', (done) => { + const addressPropertyFilter = AccountPropertyModification.createForAddress( + PropertyModificationType.Add, + account3.address, + ); + const addressModification = AccountPropertyTransaction.createAddressPropertyModificationTransaction( + Deadline.create(), + PropertyType.BlockAddress, + [addressPropertyFilter], + NetworkType.MIJIN_TEST, + ); + const signedTransaction = addressModification.signWith(account); + + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); }); - it('aggregate', (done) => { - const registerNamespaceTransaction = RegisterNamespaceTransaction.createRootNamespace( - Deadline.create(), - 'root-test-namespace-' + Math.floor(Math.random() * 10000), - UInt64.fromUint(1000), - NetworkType.MIJIN_TEST, - ); - const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), - [registerNamespaceTransaction.toAggregate(account.publicAccount)], - NetworkType.MIJIN_TEST, - []); - const signedTransaction = aggregateTransaction.signWith(account); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(signedTransaction); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); }); + transactionHttp.announce(signedTransaction); }); - describe('MosaicDefinitionTransaction', () => { - it('standalone', (done) => { - const mosaicDefinitionTransaction = MosaicDefinitionTransaction.create( - Deadline.create(), - new MosaicNonce(new Uint8Array([0xE6, 0xDE, 0x84, 0xB8])), // nonce - new MosaicId(UInt64.fromUint(1).toDTO()), // ID - MosaicProperties.create({ - supplyMutable: true, - transferable: true, - levyMutable: true, - divisibility: 3, - duration: UInt64.fromUint(1000), - }), - NetworkType.MIJIN_TEST, - ); - mosaicId = mosaicDefinitionTransaction.mosaicId; - const signedTransaction = mosaicDefinitionTransaction.signWith(account); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(signedTransaction); + }); + describe('AccountPropertyTransaction - Address', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const addressPropertyFilter = AccountPropertyModification.createForAddress( + PropertyModificationType.Remove, + account3.address, + ); + const addressModification = AccountPropertyTransaction.createAddressPropertyModificationTransaction( + Deadline.create(), + PropertyType.BlockAddress, + [addressPropertyFilter], + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [addressModification.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + [], + ); + const signedTransaction = aggregateTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); }); - it('aggregate', (done) => { - const mosaicDefinitionTransaction = MosaicDefinitionTransaction.create( - Deadline.create(), - new MosaicNonce(new Uint8Array([0xE6, 0xDE, 0x84, 0xB8])), // nonce - new MosaicId(UInt64.fromUint(1).toDTO()), // ID - MosaicProperties.create({ - supplyMutable: true, - transferable: true, - levyMutable: true, - divisibility: 3, - duration: UInt64.fromUint(1000), - }), - NetworkType.MIJIN_TEST, - ); - const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), - [mosaicDefinitionTransaction.toAggregate(account.publicAccount)], - NetworkType.MIJIN_TEST, - []); - const signedTransaction = aggregateTransaction.signWith(account); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(signedTransaction); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); }); + transactionHttp.announce(signedTransaction); }); - describe('MosaicSupplyChangeTransaction', () => { - it('standalone', (done) => { - const mosaicSupplyChangeTransaction = MosaicSupplyChangeTransaction.create( - Deadline.create(), - mosaicId, - MosaicSupplyType.Increase, - UInt64.fromUint(10), - NetworkType.MIJIN_TEST, - ); - const signedTransaction = mosaicSupplyChangeTransaction.signWith(account); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(signedTransaction); + }); + describe('AccountPropertyTransaction - Mosaic', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + + it('standalone', (done) => { + const mosaicPropertyFilter = AccountPropertyModification.createForMosaic( + PropertyModificationType.Add, + mosaicId, + ); + const addressModification = AccountPropertyTransaction.createMosaicPropertyModificationTransaction( + Deadline.create(), + PropertyType.BlockMosaic, + [mosaicPropertyFilter], + NetworkType.MIJIN_TEST, + ); + const signedTransaction = addressModification.signWith(account); + + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); }); - it('aggregate', (done) => { - const mosaicSupplyChangeTransaction = MosaicSupplyChangeTransaction.create( - Deadline.create(), - mosaicId, - MosaicSupplyType.Increase, - UInt64.fromUint(10), - NetworkType.MIJIN_TEST, - ); - const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), - [mosaicSupplyChangeTransaction.toAggregate(account.publicAccount)], - NetworkType.MIJIN_TEST, - []); - const signedTransaction = aggregateTransaction.signWith(account); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(signedTransaction); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('AccountPropertyTransaction - Mosaic', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const mosaicPropertyFilter = AccountPropertyModification.createForMosaic( + PropertyModificationType.Remove, + mosaicId, + ); + const addressModification = AccountPropertyTransaction.createMosaicPropertyModificationTransaction( + Deadline.create(), + PropertyType.BlockMosaic, + [mosaicPropertyFilter], + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [addressModification.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + [], + ); + const signedTransaction = aggregateTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('AccountPropertyTransaction - EntityType', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); }); - it('should sign a ModifyMultisigAccountTransaction with cosignatories', (done) => { - const modifyMultisigAccountTransaction = ModifyMultisigAccountTransaction.create( + it('standalone', (done) => { + const entityTypePropertyFilter = AccountPropertyModification.createForEntityType( + PropertyModificationType.Add, + TransactionType.LINK_ACCOUNT, + ); + const addressModification = AccountPropertyTransaction.createEntityTypePropertyModificationTransaction( + Deadline.create(), + PropertyType.BlockTransaction, + [entityTypePropertyFilter], + NetworkType.MIJIN_TEST, + ); + const signedTransaction = addressModification.signWith(account3); + + listener.confirmed(account3.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account3.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('AccountPropertyTransaction - EntityType', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const entityTypePropertyFilter = AccountPropertyModification.createForEntityType( + PropertyModificationType.Remove, + TransactionType.LINK_ACCOUNT, + ); + const addressModification = AccountPropertyTransaction.createEntityTypePropertyModificationTransaction( Deadline.create(), - 0, - 0, - [new MultisigCosignatoryModification( - MultisigCosignatoryModificationType.Add, - PublicAccount.createFromPublicKey('B0F93CBEE49EEB9953C6F3985B15A4F238E205584D8F924C621CBE4D7AC6EC24', - NetworkType.MIJIN_TEST), - )], + PropertyType.BlockTransaction, + [entityTypePropertyFilter], NetworkType.MIJIN_TEST, ); - const aggregateTransaction = AggregateTransaction.createBonded(Deadline.create(20, ChronoUnit.MINUTES), - [modifyMultisigAccountTransaction.toAggregate(MultisigAccount.publicAccount)], + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [addressModification.toAggregate(account3.publicAccount)], + NetworkType.MIJIN_TEST, + [], + ); + const signedTransaction = aggregateTransaction.signWith(account3); + listener.confirmed(account3.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account3.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('AccountLinkTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + + it('standalone', (done) => { + const accountLinkTransaction = AccountLinkTransaction.create( + Deadline.create(), + harvestingAccount.publicKey, + LinkAction.Unlink, + NetworkType.MIJIN_TEST, + ); + const signedTransaction = accountLinkTransaction.signWith(account); + + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('AccountLinkTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const accountLinkTransaction = AccountLinkTransaction.create( + Deadline.create(), + harvestingAccount.publicKey, + LinkAction.Unlink, + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [accountLinkTransaction.toAggregate(harvestingAccount.publicAccount)], + NetworkType.MIJIN_TEST, + [], + ); + const signedTransaction = aggregateTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('RegisterNamespaceTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const namespaceName = 'root-test-namespace-' + Math.floor(Math.random() * 10000); + const registerNamespaceTransaction = RegisterNamespaceTransaction.createRootNamespace( + Deadline.create(), + namespaceName, + UInt64.fromUint(1000), + NetworkType.MIJIN_TEST, + ); + namespaceId = new NamespaceId(namespaceName); + const signedTransaction = registerNamespaceTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('RegisterNamespaceTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const registerNamespaceTransaction = RegisterNamespaceTransaction.createRootNamespace( + Deadline.create(), + 'root-test-namespace-' + Math.floor(Math.random() * 10000), + UInt64.fromUint(1000), + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [registerNamespaceTransaction.toAggregate(account.publicAccount)], NetworkType.MIJIN_TEST, []); + const signedTransaction = aggregateTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('AddressAliasTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); - const signedTransaction = CosignatoryAccount.signTransactionWithCosignatories( - aggregateTransaction, - [Cosignatory2Account], + it('standalone', (done) => { + const addressAliasTransaction = AddressAliasTransaction.create( + Deadline.create(), + AliasActionType.Link, + namespaceId, + account.address, + NetworkType.MIJIN_TEST, ); + const signedTransaction = addressAliasTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('AddressAliasTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const addressAliasTransaction = AddressAliasTransaction.create( + Deadline.create(), + AliasActionType.Unlink, + namespaceId, + account.address, + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [addressAliasTransaction.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + [], + ); + const signedTransaction = aggregateTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('MosaicAliasTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + + it('standalone', (done) => { + const mosaicAliasTransaction = MosaicAliasTransaction.create( + Deadline.create(), + AliasActionType.Link, + namespaceId, + mosaicId, + NetworkType.MIJIN_TEST, + ); + const signedTransaction = mosaicAliasTransaction.signWith(account); + + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('MosaicAliasTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const mosaicAliasTransaction = MosaicAliasTransaction.create( + Deadline.create(), + AliasActionType.Unlink, + namespaceId, + mosaicId, + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [mosaicAliasTransaction.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + [], + ); + const signedTransaction = aggregateTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + + describe('MosaicSupplyChangeTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const mosaicSupplyChangeTransaction = MosaicSupplyChangeTransaction.create( + Deadline.create(), + mosaicId, + MosaicSupplyType.Increase, + UInt64.fromUint(10), + NetworkType.MIJIN_TEST, + ); + const signedTransaction = mosaicSupplyChangeTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account3.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + describe('MosaicSupplyChangeTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const mosaicSupplyChangeTransaction = MosaicSupplyChangeTransaction.create( + Deadline.create(), + mosaicId, + MosaicSupplyType.Increase, + UInt64.fromUint(10), + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createComplete(Deadline.create(), + [mosaicSupplyChangeTransaction.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + []); + const signedTransaction = aggregateTransaction.signWith(account); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account3.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTransaction); + }); + }); + + describe('LockFundsTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const aggregateTransaction = AggregateTransaction.createBonded( + Deadline.create(), + [], + NetworkType.MIJIN_TEST, + [], + ); + const signedTransaction = account.sign(aggregateTransaction); const lockFundsTransaction = LockFundsTransaction.create(Deadline.create(), - NetworkCurrencyMosaic.createRelative(10), + new Mosaic(networkCurrencyMosaicId, UInt64.fromUint(10 * Math.pow(10, NetworkCurrencyMosaic.DIVISIBILITY))), UInt64.fromUint(10000), signedTransaction, NetworkType.MIJIN_TEST); - setTimeout(() => { - transactionHttp.announce(lockFundsTransaction.signWith(CosignatoryAccount)); - }, 1000); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(lockFundsTransaction.signWith(account)); + }); + }); + describe('LockFundsTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const aggregateTransaction = AggregateTransaction.createBonded( + Deadline.create(), + [], + NetworkType.MIJIN_TEST, + [], + ); + const signedTransaction = account.sign(aggregateTransaction); + const lockFundsTransaction = LockFundsTransaction.create(Deadline.create(), + new Mosaic(networkCurrencyMosaicId, UInt64.fromUint(10 * Math.pow(10, NetworkCurrencyMosaic.DIVISIBILITY))), + UInt64.fromUint(10), + signedTransaction, + NetworkType.MIJIN_TEST); + const aggregateLockFundsTransaction = AggregateTransaction.createComplete(Deadline.create(), + [lockFundsTransaction.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + []); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(aggregateLockFundsTransaction.signWith(account)); + }); + }); + + describe('Aggregate Complete Transaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('should announce aggregated complete transaction', (done) => { + const signerAccount = account; + + const tx = TransferTransaction.create( + Deadline.create(), + account2.address, + [], + PlainMessage.create('Hi'), + NetworkType.MIJIN_TEST, + ); + const aggTx = AggregateTransaction.createComplete( + Deadline.create(), + [ + tx.toAggregate(signerAccount.publicAccount), + ], + NetworkType.MIJIN_TEST, + [], + ); + const signedTx = signerAccount.sign(aggTx); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(signedTx); + }); + }); + + describe('SecretLockTransaction', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Sha3_256, + sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); + }); + }); + describe('HashType: Op_Sha3_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); - validateTransactionAnnounceCorrectly(CosignatoryAccount.address, () => { - validatePartialTransactionAnnounceCorrectly(CosignatoryAccount.address, done); - setTimeout(() => { - transactionHttp.announceAggregateBonded(signedTransaction); - }, 1000); + it('aggregate', (done) => { + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Sha3_256, + sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), + account2.address, + NetworkType.MIJIN_TEST, + ); + const aggregateSecretLockTransaction = AggregateTransaction.createComplete(Deadline.create(), + [secretLockTransaction.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + []); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(aggregateSecretLockTransaction.signWith(account)); + }); + }); + describe('HashType: Keccak_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Keccak_256, + sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); + }); + }); + describe('HashType: Keccak_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Keccak_256, + sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), + account2.address, + NetworkType.MIJIN_TEST, + ); + const aggregateSecretLockTransaction = AggregateTransaction.createComplete(Deadline.create(), + [secretLockTransaction.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + []); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(aggregateSecretLockTransaction.signWith(account)); + }); + }); + describe('HashType: Op_Hash_160', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const secretSeed = String.fromCharCode.apply(null, nacl_catapult.randomBytes(20)); + const secret = CryptoJS.RIPEMD160(CryptoJS.SHA256(secretSeed).toString(CryptoJS.enc.Hex)).toString(CryptoJS.enc.Hex); + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Hash_160, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); + }); + }); + describe('HashType: Op_Hash_160', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const secretSeed = String.fromCharCode.apply(null, nacl_catapult.randomBytes(20)); + const secret = CryptoJS.RIPEMD160(CryptoJS.SHA256(secretSeed).toString(CryptoJS.enc.Hex)).toString(CryptoJS.enc.Hex); + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Hash_160, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + const aggregateSecretLockTransaction = AggregateTransaction.createComplete(Deadline.create(), + [secretLockTransaction.toAggregate(account.publicAccount)], + NetworkType.MIJIN_TEST, + []); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(aggregateSecretLockTransaction.signWith(account)); + }); + }); + describe('HashType: Op_Hash_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Hash_256, + sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); }); - - it('CosignatureTransaction', (done) => { - const transferTransaction = TransferTransaction.create( + }); + describe('HashType: Op_Hash_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const secretLockTransaction = SecretLockTransaction.create( Deadline.create(), - Address.createFromRawAddress('SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC'), - [NetworkCurrencyMosaic.createRelative(1)], - PlainMessage.create('test-message'), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Hash_256, + sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), + account2.address, NetworkType.MIJIN_TEST, ); - const aggregateTransaction = AggregateTransaction.createBonded( - Deadline.create(2, ChronoUnit.MINUTES), - [transferTransaction.toAggregate(MultisigAccount.publicAccount)], + const aggregateSecretLockTransaction = AggregateTransaction.createComplete(Deadline.create(), + [secretLockTransaction.toAggregate(account.publicAccount)], NetworkType.MIJIN_TEST, []); - const signedTransaction = aggregateTransaction.signWith( - CosignatoryAccount, - ); - - const lockFundsTransaction = LockFundsTransaction.create(Deadline.create(), - NetworkCurrencyMosaic.createRelative(10), - UInt64.fromUint(10000), - signedTransaction, - NetworkType.MIJIN_TEST); - - setTimeout(() => { - transactionHttp.announce(lockFundsTransaction.signWith(CosignatoryAccount)); - }, 1000); - - validateTransactionAnnounceCorrectly(CosignatoryAccount.address, () => { - setTimeout(() => { - transactionHttp.announceAggregateBonded(signedTransaction); - }, 1000); - - validateCosignaturePartialTransactionAnnounceCorrectly(CosignatoryAccount.address, Cosignatory2Account.publicKey, done); - validatePartialTransactionAnnounceCorrectly(CosignatoryAccount.address, () => { - accountHttp.aggregateBondedTransactions(CosignatoryAccount.publicAccount).subscribe((transactions) => { - const partialTransaction = transactions[0]; - const cosignatureTransaction = CosignatureTransaction.create(partialTransaction); - const cosignatureSignedTransaction = Cosignatory2Account.signCosignatureTransaction(cosignatureTransaction); - transactionHttp.announceAggregateBondedCosignature(cosignatureSignedTransaction); - }); - }); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); }); + transactionHttp.announce(aggregateSecretLockTransaction.signWith(account)); }); - - describe('LockFundsTransaction', () => { - it('standalone', (done) => { - const aggregateTransaction = AggregateTransaction.createBonded( + }); + describe('SecretProofTransaction - HashType: Op_Sha3_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const secretSeed = nacl_catapult.randomBytes(20); + const secret = sha3_256.create().update(secretSeed).hex(); + const proof = convert.uint8ToHex(secretSeed); + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Sha3_256, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + const secretProofTransaction = SecretProofTransaction.create( Deadline.create(), - [], + HashType.Op_Sha3_256, + secret, + proof, NetworkType.MIJIN_TEST, - [], ); - const signedTransaction = account.sign(aggregateTransaction); - - const lockFundsTransaction = LockFundsTransaction.create(Deadline.create(), - NetworkCurrencyMosaic.createRelative(10), - UInt64.fromUint(10000), - signedTransaction, - NetworkType.MIJIN_TEST); - - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(lockFundsTransaction.signWith(account)); + listener.confirmed(account2.address).subscribe((transaction: Transaction) => { + done(); + }); + transactionHttp.announce(secretProofTransaction.signWith(account2)); }); - it('aggregate', (done) => { - const aggregateTransaction = AggregateTransaction.createBonded( + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); + }); + }); + describe('SecretProofTransaction - HashType: Op_Sha3_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const secretSeed = nacl_catapult.randomBytes(20); + const secret = sha3_256.create().update(secretSeed).hex(); + const proof = convert.uint8ToHex(secretSeed); + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Sha3_256, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + listener.confirmed(account2.address).subscribe((transaction: Transaction) => { + done(); + }); + const secretProofTransaction = SecretProofTransaction.create( Deadline.create(), - [], + HashType.Op_Sha3_256, + secret, + proof, NetworkType.MIJIN_TEST, - [], ); - const signedTransaction = account.sign(aggregateTransaction); - const lockFundsTransaction = LockFundsTransaction.create(Deadline.create(), - NetworkCurrencyMosaic.createRelative(10), - UInt64.fromUint(10), - signedTransaction, - NetworkType.MIJIN_TEST); - const aggregateLockFundsTransaction = AggregateTransaction.createComplete(Deadline.create(), - [lockFundsTransaction.toAggregate(account.publicAccount)], + const aggregateSecretProofTransaction = AggregateTransaction.createComplete(Deadline.create(), + [secretProofTransaction.toAggregate(account2.publicAccount)], NetworkType.MIJIN_TEST, []); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(aggregateLockFundsTransaction.signWith(account)); - }); - }); - - describe('SecretLockTransaction', () => { - describe('HashType: Op_Sha3_256', () => { - it('standalone', (done) => { - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Sha3_256, - sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), - Address.createFromRawAddress('SDBDG4IT43MPCW2W4CBBCSJJT42AYALQN7A4VVWL'), - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(secretLockTransaction.signWith(account)); - }); - - it('aggregate', (done) => { - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Sha3_256, - sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), - Address.createFromRawAddress('SDBDG4IT43MPCW2W4CBBCSJJT42AYALQN7A4VVWL'), - NetworkType.MIJIN_TEST, - ); - const aggregateSecretLockTransaction = AggregateTransaction.createComplete(Deadline.create(), - [secretLockTransaction.toAggregate(account.publicAccount)], - NetworkType.MIJIN_TEST, - []); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(aggregateSecretLockTransaction.signWith(account)); - }); - }); - describe('HashType: Keccak_256', () => { - it('standalone', (done) => { - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Keccak_256, - sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), - Address.createFromRawAddress('SDBDG4IT43MPCW2W4CBBCSJJT42AYALQN7A4VVWL'), - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(secretLockTransaction.signWith(account)); - }); - - it('aggregate', (done) => { - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Keccak_256, - sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), - Address.createFromRawAddress('SDBDG4IT43MPCW2W4CBBCSJJT42AYALQN7A4VVWL'), - NetworkType.MIJIN_TEST, - ); - const aggregateSecretLockTransaction = AggregateTransaction.createComplete(Deadline.create(), - [secretLockTransaction.toAggregate(account.publicAccount)], - NetworkType.MIJIN_TEST, - []); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(aggregateSecretLockTransaction.signWith(account)); - }); - }); - describe('HashType: Op_Hash_160', () => { - it('standalone', (done) => { - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Hash_160, - sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), - Address.createFromRawAddress('SDBDG4IT43MPCW2W4CBBCSJJT42AYALQN7A4VVWL'), - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(secretLockTransaction.signWith(account)); - }); - - it('aggregate', (done) => { - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Hash_160, - sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), - Address.createFromRawAddress('SDBDG4IT43MPCW2W4CBBCSJJT42AYALQN7A4VVWL'), - NetworkType.MIJIN_TEST, - ); - const aggregateSecretLockTransaction = AggregateTransaction.createComplete(Deadline.create(), - [secretLockTransaction.toAggregate(account.publicAccount)], - NetworkType.MIJIN_TEST, - []); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(aggregateSecretLockTransaction.signWith(account)); - }); + transactionHttp.announce(aggregateSecretProofTransaction.signWith(account2)); }); - describe('HashType: Op_Hash_256', () => { - it('standalone', (done) => { - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Hash_256, - sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), - Address.createFromRawAddress('SDBDG4IT43MPCW2W4CBBCSJJT42AYALQN7A4VVWL'), - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(secretLockTransaction.signWith(account)); - }); - - it('aggregate', (done) => { - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Hash_256, - sha3_256.create().update(nacl_catapult.randomBytes(20)).hex(), - Address.createFromRawAddress('SDBDG4IT43MPCW2W4CBBCSJJT42AYALQN7A4VVWL'), - NetworkType.MIJIN_TEST, - ); - const aggregateSecretLockTransaction = AggregateTransaction.createComplete(Deadline.create(), - [secretLockTransaction.toAggregate(account.publicAccount)], - NetworkType.MIJIN_TEST, - []); - validateTransactionAnnounceCorrectly(account.address, done); - transactionHttp.announce(aggregateSecretLockTransaction.signWith(account)); - }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); }); + transactionHttp.announce(secretLockTransaction.signWith(account)); }); - describe('SecretProofTransaction', () => { - describe('HashType: Op_Sha3_256', () => { - it('standalone', (done) => { - const secretSeed = nacl_catapult.randomBytes(20); - const secret = sha3_256.create().update(secretSeed).hex(); - const proof = convert.uint8ToHex(secretSeed); - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Sha3_256, - secret, - account2.address, - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account.address, () => { - const secretProofTransaction = SecretProofTransaction.create( - Deadline.create(), - HashType.Op_Sha3_256, - secret, - proof, - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account2.address, done); - transactionHttp.announce(secretProofTransaction.signWith(account2)); - }); - transactionHttp.announce(secretLockTransaction.signWith(account)); - }); - - it('aggregate', (done) => { - const secretSeed = nacl_catapult.randomBytes(20); - const secret = sha3_256.create().update(secretSeed).hex(); - const proof = convert.uint8ToHex(secretSeed); - const secretLockTransaction = SecretLockTransaction.create( - Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), - HashType.Op_Sha3_256, - secret, - account2.address, - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account.address, () => { - const secretProofTransaction = SecretProofTransaction.create( - Deadline.create(), - HashType.Op_Sha3_256, - secret, - proof, - NetworkType.MIJIN_TEST, - ); - const aggregateSecretProofTransaction = AggregateTransaction.createComplete(Deadline.create(), - [secretProofTransaction.toAggregate(account2.publicAccount)], - NetworkType.MIJIN_TEST, - []); - validateTransactionAnnounceCorrectly(account2.address, done); - transactionHttp.announce(aggregateSecretProofTransaction.signWith(account2)); - }); - transactionHttp.announce(secretLockTransaction.signWith(account)); - }); - }); + }); + describe('SecretProofTransaction - HashType: Op_Keccak_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); }); - describe('HashType: Op_Keccak_256', () => { - it('standalone', (done) => { - const secretSeed = nacl_catapult.randomBytes(20); - const secret = keccak_256.create().update(secretSeed).hex(); - const proof = convert.uint8ToHex(secretSeed); - const secretLockTransaction = SecretLockTransaction.create( + it('standalone', (done) => { + const secretSeed = nacl_catapult.randomBytes(20); + const secret = keccak_256.create().update(secretSeed).hex(); + const proof = convert.uint8ToHex(secretSeed); + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Keccak_256, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + listener.confirmed(account2.address).subscribe((transaction: Transaction) => { + done(); + }); + const secretProofTransaction = SecretProofTransaction.create( Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), HashType.Op_Keccak_256, secret, - account2.address, + proof, NetworkType.MIJIN_TEST, ); - validateTransactionAnnounceCorrectly(account.address, () => { - const secretProofTransaction = SecretProofTransaction.create( - Deadline.create(), - HashType.Op_Keccak_256, - secret, - proof, - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account2.address, done); - transactionHttp.announce(secretProofTransaction.signWith(account2)); + transactionHttp.announce(secretProofTransaction.signWith(account2)); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); + }); + }); + describe('SecretProofTransaction - HashType: Op_Keccak_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const secretSeed = nacl_catapult.randomBytes(20); + const secret = keccak_256.create().update(secretSeed).hex(); + const proof = convert.uint8ToHex(secretSeed); + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Keccak_256, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + listener.confirmed(account2.address).subscribe((transaction: Transaction) => { + done(); }); - transactionHttp.announce(secretLockTransaction.signWith(account)); + done(); }); - - it('aggregate', (done) => { - const secretSeed = nacl_catapult.randomBytes(20); - const secret = keccak_256.create().update(secretSeed).hex(); - const proof = convert.uint8ToHex(secretSeed); - const secretLockTransaction = SecretLockTransaction.create( + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + const secretProofTransaction = SecretProofTransaction.create( Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), HashType.Op_Keccak_256, secret, - account2.address, + proof, NetworkType.MIJIN_TEST, ); - validateTransactionAnnounceCorrectly(account.address, () => { - const secretProofTransaction = SecretProofTransaction.create( - Deadline.create(), - HashType.Op_Keccak_256, - secret, - proof, - NetworkType.MIJIN_TEST, - ); - const aggregateSecretProofTransaction = AggregateTransaction.createComplete(Deadline.create(), - [secretProofTransaction.toAggregate(account2.publicAccount)], - NetworkType.MIJIN_TEST, - []); - validateTransactionAnnounceCorrectly(account2.address, done); - transactionHttp.announce(aggregateSecretProofTransaction.signWith(account2)); - }); - transactionHttp.announce(secretLockTransaction.signWith(account)); + const aggregateSecretProofTransaction = AggregateTransaction.createComplete(Deadline.create(), + [secretProofTransaction.toAggregate(account2.publicAccount)], + NetworkType.MIJIN_TEST, + []); + transactionHttp.announce(aggregateSecretProofTransaction.signWith(account2)); }); + transactionHttp.announce(secretLockTransaction.signWith(account)); }); - describe('HashType: Op_Hash_160', () => { - it('standalone', (done) => { - const secretSeed = String.fromCharCode.apply(null, nacl_catapult.randomBytes(20)); - const secret = CryptoJS.RIPEMD160(CryptoJS.SHA256(secretSeed).toString(CryptoJS.enc.Hex)).toString(CryptoJS.enc.Hex); - const proof = convert.uint8ToHex(secretSeed); - const secretLockTransaction = SecretLockTransaction.create( + }); + describe('SecretProofTransaction - HashType: Op_Hash_160', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('standalone', (done) => { + const randomBytes = secureRandom.randomBuffer(32); + const secretSeed = randomBytes.toString('hex'); + const hash = sha256(Buffer.from(secretSeed, 'hex')); + const secret = new ripemd160().update(Buffer.from(hash, 'hex')).digest('hex'); + const proof = secretSeed; + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Hash_160, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + listener.confirmed(account2.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account2.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + const secretProofTransaction = SecretProofTransaction.create( Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), HashType.Op_Hash_160, secret, - account2.address, + proof, NetworkType.MIJIN_TEST, ); - validateTransactionAnnounceCorrectly(account.address, () => { - const secretProofTransaction = SecretProofTransaction.create( - Deadline.create(), - HashType.Op_Hash_160, - secret, - proof, - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account2.address, done); - transactionHttp.announce(secretProofTransaction.signWith(account2)); - }); - transactionHttp.announce(secretLockTransaction.signWith(account)); + transactionHttp.announce(secretProofTransaction.signWith(account2)); }); - - it('aggregate', (done) => { - const secretSeed = String.fromCharCode.apply(null, nacl_catapult.randomBytes(20)); - const secret = CryptoJS.RIPEMD160(CryptoJS.SHA256(secretSeed).toString(CryptoJS.enc.Hex)).toString(CryptoJS.enc.Hex); - const proof = convert.uint8ToHex(secretSeed); - const secretLockTransaction = SecretLockTransaction.create( + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); + }); + }); + describe('SecretProofTransaction - HashType: Op_Hash_160', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const randomBytes = secureRandom.randomBuffer(32); + const secretSeed = randomBytes.toString('hex'); + const hash = sha256(Buffer.from(secretSeed, 'hex')); + const secret = new ripemd160().update(Buffer.from(hash, 'hex')).digest('hex'); + const proof = secretSeed; + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Hash_160, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + listener.confirmed(account2.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account2.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + const secretProofTransaction = SecretProofTransaction.create( Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), HashType.Op_Hash_160, secret, - account2.address, + proof, NetworkType.MIJIN_TEST, ); - validateTransactionAnnounceCorrectly(account.address, () => { - const secretProofTransaction = SecretProofTransaction.create( - Deadline.create(), - HashType.Op_Hash_160, - secret, - proof, - NetworkType.MIJIN_TEST, - ); - const aggregateSecretProofTransaction = AggregateTransaction.createComplete(Deadline.create(), - [secretProofTransaction.toAggregate(account2.publicAccount)], - NetworkType.MIJIN_TEST, - []); - validateTransactionAnnounceCorrectly(account2.address, done); - transactionHttp.announce(aggregateSecretProofTransaction.signWith(account2)); - }); - transactionHttp.announce(secretLockTransaction.signWith(account)); + const aggregateSecretProofTransaction = AggregateTransaction.createComplete(Deadline.create(), + [secretProofTransaction.toAggregate(account2.publicAccount)], + NetworkType.MIJIN_TEST, + []); + transactionHttp.announce(aggregateSecretProofTransaction.signWith(account2)); }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); + }); + }); + describe('SecretProofTransaction - HashType: Op_Hash_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); }); - describe('HashType: Op_Hash_256', () => { - it('standalone', (done) => { - const secretSeed = String.fromCharCode.apply(null, nacl_catapult.randomBytes(20)); - const secret = CryptoJS.SHA256(CryptoJS.SHA256(secretSeed).toString(CryptoJS.enc.Hex)).toString(CryptoJS.enc.Hex); - const proof = convert.uint8ToHex(secretSeed); - const secretLockTransaction = SecretLockTransaction.create( + it('standalone', (done) => { + const randomBytes = secureRandom.randomBuffer(32); + const secretSeed = randomBytes.toString('hex'); + const hash = sha256(Buffer.from(secretSeed, 'hex')); + const secret = sha256(Buffer.from(hash, 'hex')); + const proof = secretSeed; + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Hash_256, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + listener.confirmed(account2.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account2.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + const secretProofTransaction = SecretProofTransaction.create( Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), HashType.Op_Hash_256, secret, - account2.address, + proof, NetworkType.MIJIN_TEST, ); - validateTransactionAnnounceCorrectly(account.address, () => { - const secretProofTransaction = SecretProofTransaction.create( - Deadline.create(), - HashType.Op_Hash_256, - secret, - proof, - NetworkType.MIJIN_TEST, - ); - validateTransactionAnnounceCorrectly(account2.address, done); - transactionHttp.announce(secretProofTransaction.signWith(account2)); - }); - transactionHttp.announce(secretLockTransaction.signWith(account)); + transactionHttp.announce(secretProofTransaction.signWith(account2)); }); - - it('aggregate', (done) => { - const secretSeed = String.fromCharCode.apply(null, nacl_catapult.randomBytes(20)); - const secret = CryptoJS.SHA256(CryptoJS.SHA256(secretSeed).toString(CryptoJS.enc.Hex)).toString(CryptoJS.enc.Hex); - const proof = convert.uint8ToHex(secretSeed); - const secretLockTransaction = SecretLockTransaction.create( + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); + }); + }); + describe('SecretProofTransaction - HashType: Op_Hash_256', () => { + let listener: Listener; + before (() => { + listener = new Listener(config.apiUrl); + return listener.open(); + }); + after(() => { + return listener.close(); + }); + it('aggregate', (done) => { + const randomBytes = secureRandom.randomBuffer(32); + const secretSeed = randomBytes.toString('hex'); + const hash = sha256(Buffer.from(secretSeed, 'hex')); + const secret = sha256(Buffer.from(hash, 'hex')); + const proof = secretSeed; + const secretLockTransaction = SecretLockTransaction.create( + Deadline.create(), + NetworkCurrencyMosaic.createAbsolute(10), + UInt64.fromUint(100), + HashType.Op_Hash_256, + secret, + account2.address, + NetworkType.MIJIN_TEST, + ); + listener.confirmed(account.address).subscribe((transaction: Transaction) => { + listener.confirmed(account2.address).subscribe((transaction: Transaction) => { + done(); + }); + listener.status(account2.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + const secretProofTransaction = SecretProofTransaction.create( Deadline.create(), - NetworkCurrencyMosaic.createAbsolute(10), - UInt64.fromUint(100), HashType.Op_Hash_256, secret, - account2.address, + proof, NetworkType.MIJIN_TEST, ); - validateTransactionAnnounceCorrectly(account.address, () => { - const secretProofTransaction = SecretProofTransaction.create( - Deadline.create(), - HashType.Op_Hash_256, - secret, - proof, - NetworkType.MIJIN_TEST, - ); - const aggregateSecretProofTransaction = AggregateTransaction.createComplete(Deadline.create(), - [secretProofTransaction.toAggregate(account2.publicAccount)], - NetworkType.MIJIN_TEST, - []); - validateTransactionAnnounceCorrectly(account2.address, done); - transactionHttp.announce(aggregateSecretProofTransaction.signWith(account2)); - }); - transactionHttp.announce(secretLockTransaction.signWith(account)); + const aggregateSecretProofTransaction = AggregateTransaction.createComplete(Deadline.create(), + [secretProofTransaction.toAggregate(account2.publicAccount)], + NetworkType.MIJIN_TEST, + []); + transactionHttp.announce(aggregateSecretProofTransaction.signWith(account2)); + }); + listener.status(account.address).subscribe((error) => { + console.log('Error:', error); + assert(false); + done(); + }); + transactionHttp.announce(secretLockTransaction.signWith(account)); + }); + }); + + describe('transactions', () => { + it('should call transactions successfully', (done) => { + accountHttp.transactions(account.publicAccount).subscribe((transactions) => { + const transaction = transactions[0]; + transactionId = transaction.transactionInfo!.id; + transactionHash = transaction.transactionInfo!.hash; + done(); }); }); }); @@ -762,11 +1604,11 @@ describe('TransactionHttp', () => { }); describe('getTransactionStatus', () => { - it('should return transaction status given array transactionHash', (done) => { + it('should return transaction status given transactionHash', (done) => { transactionHttp.getTransactionStatus(transactionHash) .subscribe((transactionStatus) => { expect(transactionStatus.group).to.be.equal('confirmed'); - expect(transactionStatus.height.lower).to.be.equal(1); + expect(transactionStatus.height.lower).to.be.greaterThan(0); expect(transactionStatus.height.higher).to.be.equal(0); done(); }); @@ -778,7 +1620,7 @@ describe('TransactionHttp', () => { transactionHttp.getTransactionsStatuses([transactionHash]) .subscribe((transactionStatuses) => { expect(transactionStatuses[0].group).to.be.equal('confirmed'); - expect(transactionStatuses[0].height.lower).to.be.equal(1); + expect(transactionStatuses[0].height.lower).to.be.greaterThan(0); expect(transactionStatuses[0].height.higher).to.be.equal(0); done(); }); @@ -787,8 +1629,15 @@ describe('TransactionHttp', () => { describe('announce', () => { it('should return success when announce', (done) => { - const payload = new SignedTransaction('', '', '', TransactionType.TRANSFER, NetworkType.MIJIN_TEST); - transactionHttp.announce(payload) + const transferTransaction = TransferTransaction.create( + Deadline.create(), + account2.address, + [NetworkCurrencyMosaic.createAbsolute(1)], + PlainMessage.create('test-message'), + NetworkType.MIJIN_TEST, + ); + const signedTransaction = transferTransaction.signWith(account); + transactionHttp.announce(signedTransaction) .subscribe((transactionAnnounceResponse) => { expect(transactionAnnounceResponse.message) .to.be.equal('packet 9 was pushed to the network via /transaction'); @@ -799,8 +1648,22 @@ describe('TransactionHttp', () => { describe('announceAggregateBonded', () => { it('should return success when announceAggregateBonded', (done) => { - const payload = new SignedTransaction('', '', '', TransactionType.TRANSFER, NetworkType.MIJIN_TEST); - transactionHttp.announceAggregateBonded(payload) + const transferTransaction = TransferTransaction.create( + Deadline.create(), + account2.address, + [NetworkCurrencyMosaic.createRelative(1)], + PlainMessage.create('test-message'), + NetworkType.MIJIN_TEST, + ); + const aggregateTransaction = AggregateTransaction.createBonded( + Deadline.create(2, ChronoUnit.MINUTES), + [transferTransaction.toAggregate(multisigAccount.publicAccount)], + NetworkType.MIJIN_TEST, + []); + const signedTransaction = aggregateTransaction.signWith( + cosignAccount1, + ); + transactionHttp.announceAggregateBonded(signedTransaction) .subscribe((transactionAnnounceResponse) => { expect(transactionAnnounceResponse.message) .to.be.equal('packet 500 was pushed to the network via /transaction/partial'); @@ -821,60 +1684,6 @@ describe('TransactionHttp', () => { }); }); - describe('aggregate complete tx', () => { - it('should work', () => { - const signerAccount = Account.createFromPrivateKey( - '5098D500390934F81EA416D9A2F50F276DE446E28488E1801212931E3470DA31', NetworkType.MIJIN_TEST); - - const tx = TransferTransaction.create( - Deadline.create(), - Address.createFromRawAddress('SAGY2PTFX4T2XYKYXTJXYCTQRP3FESQH5MEQI2RQ'), - [], - PlainMessage.create('Hi'), - NetworkType.MIJIN_TEST, - ); - const aggTx = AggregateTransaction.createComplete( - Deadline.create(), - [ - tx.toAggregate(signerAccount.publicAccount), - ], - NetworkType.MIJIN_TEST, - [], - ); - const signedTx = signerAccount.sign(aggTx); - const trnsHttp = new TransactionHttp(APIUrl); - trnsHttp.announceAggregateBonded(signedTx) - .subscribe((res) => { - console.log('res', res); - }); - }); - }); - - describe('announceSync', () => { - it('should return insufficient balance error', (done) => { - const signerAccount = Account.createFromPrivateKey( - '5098D500390934F81EA416D9A2F50F276DE446E28488E1801212931E3470DA31', NetworkType.MIJIN_TEST); - - const tx = TransferTransaction.create( - Deadline.create(), - Address.createFromRawAddress('SAGY2PTFX4T2XYKYXTJXYCTQRP3FESQH5MEQI2RQ'), - [NetworkCurrencyMosaic.createRelative(10)], - EmptyMessage, - NetworkType.MIJIN_TEST, - ); - const signedTx = signerAccount.sign(tx); - const trnsHttp = new TransactionHttp(APIUrl); - trnsHttp - .announceSync(signedTx) - .subscribe((shouldNotBeCalled) => { - throw new Error('should not be called'); - }, (err) => { - expect(err.status).to.be.equal('Failure_Core_Insufficient_Balance'); - done(); - }); - }); - }); - describe('getTransactionEffectiveFee', () => { it('should return effective paid fee given transactionHash', (done) => { transactionHttp.getTransactionEffectiveFee(transactionHash) @@ -885,4 +1694,65 @@ describe('TransactionHttp', () => { }); }); }); + // describe('announceSync', () => { + // it('should return insufficient balance error', (done) => { + // const aggregateTransaction = AggregateTransaction.createBonded( + // Deadline.create(), + // [], + // NetworkType.MIJIN_TEST, + // [], + // ); + // const signedTransaction = account.sign(aggregateTransaction); + + // const lockFundsTransaction = LockFundsTransaction.create(Deadline.create(), + // NetworkCurrencyMosaic.createAbsolute(0), + // UInt64.fromUint(10000), + // signedTransaction, + // NetworkType.MIJIN_TEST); + + // transactionHttp + // .announceSync(lockFundsTransaction.signWith(account)) + // .subscribe((shouldNotBeCalled) => { + // throw new Error('should not be called'); + // }, (err) => { + // console.log(err); + // expect(err.status).to.be.equal('Failure_LockHash_Invalid_Mosaic_Amount'); + // done(); + // }); + // }); + // }); + + // Already created / tested in account http + // describe('ModifyMultisigAccountTransaction', () => { + // let listener: Listener; + // before (() => { + // listener = new Listener(config.apiUrl); + // return listener.open(); + // }); + // after(() => { + // return listener.close(); + // }); + // it('Add cosigners', (done) => { + // const modifyMultisigAccountTransaction = ModifyMultisigAccountTransaction.create( + // Deadline.create(), + // 2, + // 1, + // [ new MultisigCosignatoryModification(MultisigCosignatoryModificationType.Add, cosignAccount1.publicAccount), + // new MultisigCosignatoryModification(MultisigCosignatoryModificationType.Add, cosignAccount2.publicAccount), + // new MultisigCosignatoryModification(MultisigCosignatoryModificationType.Add, cosignAccount3.publicAccount), + // ], + // NetworkType.MIJIN_TEST, + // ); + // const signedTransaction = multisigAccount.sign(modifyMultisigAccountTransaction); + // listener.confirmed(multisigAccount.address).subscribe((transaction: Transaction) => { + // done(); + // }); + // listener.status(multisigAccount.address).subscribe((error) => { + // console.log('Error:', error); + // assert(false); + // done(); + // }); + // transactionHttp.announce(signedTransaction); + // }); + // }); }); diff --git a/e2e/infrastructure/TransactionUtils.ts b/e2e/infrastructure/TransactionUtils.ts index 48ce119e93..bdeae17a24 100644 --- a/e2e/infrastructure/TransactionUtils.ts +++ b/e2e/infrastructure/TransactionUtils.ts @@ -19,77 +19,89 @@ import {Account} from '../../src/model/account/Account'; import {Address} from '../../src/model/account/Address'; import { PublicAccount } from '../../src/model/account/PublicAccount'; import {NetworkType} from '../../src/model/blockchain/NetworkType'; +import { Mosaic } from '../../src/model/mosaic/Mosaic'; +import { MosaicId } from '../../src/model/mosaic/MosaicId'; import {NetworkCurrencyMosaic} from '../../src/model/mosaic/NetworkCurrencyMosaic'; import {AggregateTransaction} from '../../src/model/transaction/AggregateTransaction'; import {CosignatureTransaction} from '../../src/model/transaction/CosignatureTransaction'; import {Deadline} from '../../src/model/transaction/Deadline'; +import { LockFundsTransaction } from '../../src/model/transaction/LockFundsTransaction'; import { ModifyMultisigAccountTransaction } from '../../src/model/transaction/ModifyMultisigAccountTransaction'; import { MultisigCosignatoryModification } from '../../src/model/transaction/MultisigCosignatoryModification'; import { MultisigCosignatoryModificationType } from '../../src/model/transaction/MultisigCosignatoryModificationType'; import {PlainMessage} from '../../src/model/transaction/PlainMessage'; +import { SignedTransaction } from '../../src/model/transaction/SignedTransaction'; import {TransferTransaction} from '../../src/model/transaction/TransferTransaction'; import {UInt64} from '../../src/model/UInt64'; -import {CosignatoryAccount, MultisigAccount, NIS2_URL, TestingAccount} from '../../test/conf/conf.spec'; export class TransactionUtils { - public static createAndAnnounce(recipient: Address = Address.createFromRawAddress('SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC'), - transactionHttp: TransactionHttp = new TransactionHttp(NIS2_URL)) { - const account = TestingAccount; + public static createAndAnnounce(signer: Account, + recipient: Address, + transactionHttp: TransactionHttp, + mosaic: Mosaic[] = []) { const transferTransaction = TransferTransaction.create( Deadline.create(), recipient, - [], + mosaic, PlainMessage.create('test-message'), NetworkType.MIJIN_TEST, ); - const signedTransaction = account.sign(transferTransaction); + const signedTransaction = signer.sign(transferTransaction); transactionHttp.announce(signedTransaction); } - public static createAndAnnounceWithInsufficientBalance(transactionHttp: TransactionHttp = new TransactionHttp(NIS2_URL)) { - const account = TestingAccount; - const transferTransaction = TransferTransaction.create( - Deadline.create(), - Address.createFromRawAddress('SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC'), - [NetworkCurrencyMosaic.createRelative(100000000000)], - PlainMessage.create('test-message'), - NetworkType.MIJIN_TEST, - ); - const signedTransaction = account.sign(transferTransaction); - transactionHttp.announce(signedTransaction); + public static announceAggregateBoundedTransaction(signedTransaction: SignedTransaction, + transactionHttp: TransactionHttp) { + transactionHttp.announceAggregateBonded(signedTransaction); } - public static createAggregateBoundedTransactionAndAnnounce(transactionHttp: TransactionHttp = new TransactionHttp(NIS2_URL)) { + public static createSignedAggregatedBondTransaction(aggregatedTo: Account, + signer: Account, + recipient: Address) { + const transferTransaction = TransferTransaction.create( Deadline.create(), - Address.createFromRawAddress('SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC'), - [NetworkCurrencyMosaic.createRelative(100000000000)], + recipient, + [], PlainMessage.create('test-message'), NetworkType.MIJIN_TEST, ); const aggregateTransaction = AggregateTransaction.createBonded( Deadline.create(2, ChronoUnit.MINUTES), - [transferTransaction.toAggregate(MultisigAccount.publicAccount)], + [transferTransaction.toAggregate(aggregatedTo.publicAccount)], NetworkType.MIJIN_TEST, [], ); + return signer.sign(aggregateTransaction); + } - const signedTransaction = CosignatoryAccount.sign(aggregateTransaction); - transactionHttp.announceAggregateBonded(signedTransaction); + public static createHashLockTransactionAndAnnounce(signedAggregatedTransaction: SignedTransaction, + signer: Account, + mosaicId: MosaicId, + transactionHttp: TransactionHttp) { + const lockFundsTransaction = LockFundsTransaction.create( + Deadline.create(), + new Mosaic(mosaicId, UInt64.fromUint(10 * Math.pow(10, NetworkCurrencyMosaic.DIVISIBILITY))), + UInt64.fromUint(1000), + signedAggregatedTransaction, + NetworkType.MIJIN_TEST, + ); + const signedLockFundsTransaction = signer.sign(lockFundsTransaction); + transactionHttp.announce(signedLockFundsTransaction); } public static cosignTransaction(transaction: AggregateTransaction, account: Account, - transactionHttp: TransactionHttp = new TransactionHttp(NIS2_URL)) { + transactionHttp: TransactionHttp) { const cosignatureTransaction = CosignatureTransaction.create(transaction); const cosignatureSignedTransaction = account.signCosignatureTransaction(cosignatureTransaction); transactionHttp.announceAggregateBondedCosignature(cosignatureSignedTransaction); } public static createModifyMultisigAccountTransaction( account: Account, - transactionHttp: TransactionHttp = new TransactionHttp(NIS2_URL)) { + transactionHttp: TransactionHttp) { const modifyMultisig = ModifyMultisigAccountTransaction.create( Deadline.create(), 2, diff --git a/e2e/infrastructure/transaction/CreateTransactionFromDTO.spec.ts b/e2e/infrastructure/transaction/CreateTransactionFromDTO.spec.ts index 36271517fc..f16b723c68 100644 --- a/e2e/infrastructure/transaction/CreateTransactionFromDTO.spec.ts +++ b/e2e/infrastructure/transaction/CreateTransactionFromDTO.spec.ts @@ -1,20 +1,23 @@ /* * Copyright 2018 NEM * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, + * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ - +import {deepEqual} from 'assert'; +import {expect} from 'chai'; import {CreateTransactionFromDTO} from '../../../src/infrastructure/transaction/CreateTransactionFromDTO'; +import { Address } from '../../../src/model/account/Address'; +import { TransferTransaction } from '../../../src/model/transaction/TransferTransaction'; import ValidateTransaction from './ValidateTransaction'; describe('CreateTransactionFromDTO', () => { @@ -23,99 +26,75 @@ describe('CreateTransactionFromDTO', () => { it('standalone', () => { const transferTransactionDTO = { meta: { - hash: '18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219', height: [ - 1, + 78, 0, ], - id: '59FDA0733F17CF0001772CA7', - index: 19, - merkleComponentHash: '18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219', + hash: '533243B8575C4058F894C453160AFF055A4A905978AC331460F44104D831E4AC', + merkleComponentHash: '533243B8575C4058F894C453160AFF055A4A905978AC331460F44104D831E4AC', + index: 0, + id: '5CD2B76B2B3F0F0001751380', }, transaction: { - deadline: [ - 10000, - 0, - ], - fee: [ - 0, - 0, - ], + // tslint:disable-next-line:max-line-length + signature: '7442156D839A3AC900BC0299E8701ECDABA674DCF91283223450953B005DE72C538EA54236F5E089530074CE78067CD3325CF53750B9118154C08B20A5CDC00D', + signer: '2FC3872A792933617D70E02AFF8FBDE152821A0DF0CA5FB04CB56FC3D21C8863', + version: 36867, + type: 16724, + maxFee: [0, 0], + deadline: [3362498678, 22], + recipient: '906415867F121D037AF447E711B0F5E4D52EBBF066D96860EB', message: { payload: '746573742D6D657373616765', type: 0, }, mosaics: [ { - amount: [ - 3863990592, - 95248, - ], - id: [ - 3646934825, - 3576016193, - ], + id: [3294802500, 2243684972], + amount: [10, 0], }, ], - recipient: '9050B9837EFAB4BBE8A4B9BB32D812F9885C00D8FC1650E142', - signature: '553E696EB4A54E43A11D180EBA57E4B89D0048C9DD2604A9E0608120018B9E0' + - '2F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E', - signer: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', - type: 16724, - version: 36867, }, }; - const transferTransaction = CreateTransactionFromDTO(transferTransactionDTO); - - ValidateTransaction.validateStandaloneTx(transferTransaction, transferTransactionDTO); + const transferTransaction = CreateTransactionFromDTO(transferTransactionDTO) as TransferTransaction; + deepEqual(transferTransaction.recipient, Address.createFromEncoded(transferTransactionDTO.transaction.recipient)); + expect(transferTransaction.message.payload).to.be.equal('test-message'); }); it('standalone without message', () => { const transferTransactionDTO = { meta: { - hash: '18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219', height: [ - 1, + 78, 0, ], - id: '59FDA0733F17CF0001772CA7', - index: 19, - merkleComponentHash: '18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219', + hash: '533243B8575C4058F894C453160AFF055A4A905978AC331460F44104D831E4AC', + merkleComponentHash: '533243B8575C4058F894C453160AFF055A4A905978AC331460F44104D831E4AC', + index: 0, + id: '5CD2B76B2B3F0F0001751380', }, transaction: { - deadline: [ - 10000, - 0, - ], - fee: [ - 0, - 0, - ], + // tslint:disable-next-line:max-line-length + signature: '7442156D839A3AC900BC0299E8701ECDABA674DCF91283223450953B005DE72C538EA54236F5E089530074CE78067CD3325CF53750B9118154C08B20A5CDC00D', + signer: '2FC3872A792933617D70E02AFF8FBDE152821A0DF0CA5FB04CB56FC3D21C8863', + version: 36867, + type: 16724, + maxFee: [0, 0], + deadline: [3362498678, 22], + recipient: '906415867F121D037AF447E711B0F5E4D52EBBF066D96860EB', mosaics: [ { - amount: [ - 3863990592, - 95248, - ], - id: [ - 3646934825, - 3576016193, - ], + id: [3294802500, 2243684972], + amount: [10, 0], }, ], - recipient: '9050B9837EFAB4BBE8A4B9BB32D812F9885C00D8FC1650E142', - signature: '553E696EB4A54E43A11D180EBA57E4B89D0048C9DD2604A9E0608120018B9E0' + - '2F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E', - signer: 'B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF', - type: 16724, - version: 36867, }, }; - const transferTransaction = CreateTransactionFromDTO(transferTransactionDTO); - - ValidateTransaction.validateStandaloneTx(transferTransaction, transferTransactionDTO); + const transferTransaction = CreateTransactionFromDTO(transferTransactionDTO) as TransferTransaction; + deepEqual(transferTransaction.recipient, Address.createFromEncoded(transferTransactionDTO.transaction.recipient)); + expect(transferTransaction.message.payload).to.be.equal(''); }); it('aggregate', () => { @@ -142,7 +121,7 @@ describe('CreateTransactionFromDTO', () => { 3266625578, 11, ], - fee: [ + maxFee: [ 0, 0, ], @@ -186,7 +165,7 @@ describe('CreateTransactionFromDTO', () => { }, ], type: 16705, - version: 36867, + version: 36866, }, }; @@ -219,7 +198,7 @@ describe('CreateTransactionFromDTO', () => { 1000, 0, ], - fee: [ + maxFee: [ 0, 0, ], @@ -266,7 +245,7 @@ describe('CreateTransactionFromDTO', () => { 3266625578, 11, ], - fee: [ + maxFee: [ 0, 0, ], @@ -334,7 +313,7 @@ describe('CreateTransactionFromDTO', () => { 1, 0, ], - fee: [ + maxFee: [ 0, 0, ], @@ -384,7 +363,7 @@ describe('CreateTransactionFromDTO', () => { 3266625578, 11, ], - fee: [ + maxFee: [ 0, 0, ], @@ -452,7 +431,7 @@ describe('CreateTransactionFromDTO', () => { 1, 0, ], - fee: [ + maxFee: [ 0, 0, ], @@ -524,7 +503,7 @@ describe('CreateTransactionFromDTO', () => { 3266625578, 11, ], - fee: [ + maxFee: [ 0, 0, ], @@ -617,7 +596,7 @@ describe('CreateTransactionFromDTO', () => { 0, ], direction: 1, - fee: [ + maxFee: [ 0, 0, ], @@ -662,7 +641,7 @@ describe('CreateTransactionFromDTO', () => { 3266625578, 11, ], - fee: [ + maxFee: [ 0, 0, ], @@ -728,7 +707,7 @@ describe('CreateTransactionFromDTO', () => { 1, 0, ], - fee: [ + maxFee: [ 0, 0, ], @@ -736,7 +715,7 @@ describe('CreateTransactionFromDTO', () => { minRemovalDelta: 1, modifications: [ { - cosignatoryPublicKey: '589B73FBC22063E9AE6FBAC67CB9C6EA865EF556E5FB8B7310D45F77C1250B97', + cosignatoryPublicKey: '76C1622C7FB58986E500228E8FFB30C606CAAFC1CD78E770E82C73DAB7BD7C9F', type: 0, }, ], @@ -778,7 +757,7 @@ describe('CreateTransactionFromDTO', () => { 3266625578, 11, ], - fee: [ + maxFee: [ 0, 0, ], diff --git a/e2e/infrastructure/transaction/ValidateTransaction.ts b/e2e/infrastructure/transaction/ValidateTransaction.ts index f193ce5bee..2269bab747 100644 --- a/e2e/infrastructure/transaction/ValidateTransaction.ts +++ b/e2e/infrastructure/transaction/ValidateTransaction.ts @@ -20,6 +20,10 @@ import {MultisigCosignatoryModification} from '../../../src/model/transaction/Mu import {TransactionType} from '../../../src/model/transaction/TransactionType'; import {UInt64} from '../../../src/model/UInt64'; import {Address} from '../../../src/model/account/Address'; +import { NamespaceId } from '../../../src/model/namespace/NamespaceId'; +import { MosaicId } from '../../../src/model/mosaic/MosaicId'; +import { PublicAccount } from '../../../src/model/account/PublicAccount'; +import { NetworkType } from '../../../src/model/blockchain/NetworkType'; const ValidateTransaction = { validateStandaloneTx: (transaction, transactionDTO) => { @@ -44,12 +48,11 @@ const ValidateTransaction = { .to.be.equal(parseInt(transactionDTO.transaction.version.toString(16).substr(2, 2), 16)); expect(transaction.type) .to.be.equal(transactionDTO.transaction.type); - deepEqual(transaction.fee, - new UInt64(transactionDTO.transaction.fee)); + deepEqual(transaction.maxFee, + new UInt64(transactionDTO.transaction.maxFee)); deepEqual(transaction.deadline.toDTO(), transactionDTO.transaction.deadline); - if (transaction.type === TransactionType.TRANSFER) { ValidateTransaction.validateTransferTx(transaction, transactionDTO); } else if (transaction.type === TransactionType.REGISTER_NAMESPACE) { @@ -84,8 +87,8 @@ const ValidateTransaction = { .to.be.equal(parseInt(aggregateTransactionDTO.transaction.version.toString(16).substr(2, 2), 16)); expect(aggregateTransaction.type) .to.be.equal(aggregateTransactionDTO.transaction.type); - deepEqual(aggregateTransaction.fee, - new UInt64(aggregateTransactionDTO.transaction.fee)); + deepEqual(aggregateTransaction.maxFee, + new UInt64(aggregateTransactionDTO.transaction.maxFee)); deepEqual(aggregateTransaction.deadline.toDTO(), aggregateTransactionDTO.transaction.deadline); @@ -94,12 +97,8 @@ const ValidateTransaction = { }, validateMosaicCreationTx: (mosaicDefinitionTransaction, mosaicDefinitionTransactionDTO) => { - deepEqual(mosaicDefinitionTransaction.parentId, - new UInt64(mosaicDefinitionTransactionDTO.transaction.parentId)); deepEqual(mosaicDefinitionTransaction.mosaicId, - new UInt64(mosaicDefinitionTransactionDTO.transaction.mosaicId)); - expect(mosaicDefinitionTransaction.mosaicName) - .to.be.equal(mosaicDefinitionTransactionDTO.transaction.name); + new MosaicId(mosaicDefinitionTransactionDTO.transaction.mosaicId)); expect(mosaicDefinitionTransaction.mosaicProperties.divisibility) .to.be.equal(mosaicDefinitionTransactionDTO.transaction.properties[1].value[0]); deepEqual(mosaicDefinitionTransaction.mosaicProperties.duration, @@ -114,7 +113,7 @@ const ValidateTransaction = { }, validateMosaicSupplyChangeTx: (mosaicSupplyChangeTransaction, mosaicSupplyChangeTransactionDTO) => { deepEqual(mosaicSupplyChangeTransaction.mosaicId, - new UInt64(mosaicSupplyChangeTransactionDTO.transaction.mosaicId)); + new MosaicId(mosaicSupplyChangeTransactionDTO.transaction.mosaicId)); expect(mosaicSupplyChangeTransaction.direction) .to.be.equal(mosaicSupplyChangeTransactionDTO.transaction.direction); deepEqual(mosaicSupplyChangeTransaction.delta, @@ -128,7 +127,8 @@ const ValidateTransaction = { deepEqual(modifyMultisigAccountTransaction.modifications[0], new MultisigCosignatoryModification( modifyMultisigAccountTransactionDTO.transaction.modifications[0].type, - modifyMultisigAccountTransactionDTO.transaction.modifications[0].cosignatoryPublicAccount, + PublicAccount.createFromPublicKey(modifyMultisigAccountTransactionDTO.transaction.modifications[0].cosignatoryPublicKey, + NetworkType.MIJIN_TEST), ), ); }, @@ -138,21 +138,21 @@ const ValidateTransaction = { expect(registerNamespaceTransaction.namespaceName) .to.be.equal(registerNamespaceTransactionDTO.transaction.name); deepEqual(registerNamespaceTransaction.namespaceId, - new UInt64(registerNamespaceTransactionDTO.transaction.namespaceId)); + new NamespaceId(registerNamespaceTransactionDTO.transaction.namespaceId)); if (registerNamespaceTransaction.namespaceType === 0) { deepEqual(registerNamespaceTransaction.duration, new UInt64(registerNamespaceTransactionDTO.transaction.duration)); } else { deepEqual(registerNamespaceTransaction.parentId, - new UInt64(registerNamespaceTransactionDTO.transaction.parentId)); + new NamespaceId(registerNamespaceTransactionDTO.transaction.parentId)); } }, validateTransferTx: (transferTransaction, transferTransactionDTO) => { deepEqual(transferTransaction.recipient, Address.createFromEncoded(transferTransactionDTO.transaction.recipient)); expect(transferTransaction.message.payload) - .to.be.equal("test-message"); + .to.be.equal('test-message'); }, }; diff --git a/e2e/service/MosaicService.spec.ts b/e2e/service/MosaicService.spec.ts index 398ec7cb31..540e264d48 100644 --- a/e2e/service/MosaicService.spec.ts +++ b/e2e/service/MosaicService.spec.ts @@ -3,17 +3,29 @@ import { AccountHttp } from '../../src/infrastructure/AccountHttp'; import { MosaicHttp } from '../../src/infrastructure/MosaicHttp'; import { Address } from '../../src/model/account/Address'; import { MosaicService } from '../../src/service/MosaicService'; -import { APIUrl } from '../conf/conf.spec'; describe('MosaicService', () => { + let accountAddress: Address; + let accountHttp: AccountHttp; + let mosaicHttp: MosaicHttp; + before((done) => { + const path = require('path'); + require('fs').readFile(path.resolve(__dirname, '../conf/network.conf'), (err, data) => { + if (err) { + throw err; + } + const json = JSON.parse(data); + accountAddress = Address.createFromRawAddress(json.testAccount.address); + accountHttp = new AccountHttp(json.apiUrl); + mosaicHttp = new MosaicHttp(json.apiUrl); + done(); + }); + }); it('should return the mosaic list skipping the expired mosaics', () => { - const mosaicService = new MosaicService( - new AccountHttp(APIUrl), - new MosaicHttp(APIUrl), - ); + const mosaicService = new MosaicService(accountHttp, mosaicHttp); - const address = Address.createFromRawAddress('SCO2JY-N6OJSM-CJPPVS-Z3OX7P-TWPQEJ-GZTI6W-GLKK'); + const address = accountAddress; return mosaicService.mosaicsAmountViewFromAddress(address).pipe( mergeMap((_) => _), diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000000..d13ac58e55 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,8 @@ +var gulp = require("gulp"); +var ts = require("gulp-typescript"); +var tsProject = ts.createProject("tsconfig.json"); + +gulp.task("default", function () { + return gulp.src('e2e/conf/*.conf') + .pipe(gulp.dest('dist/e2e/conf/')) +}); diff --git a/package-lock.json b/package-lock.json index 9dc37b8920..131433d714 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,6 +101,24 @@ "json-schema-traverse": "^0.3.0" } }, + "ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dev": true, + "requires": { + "ansi-wrap": "^0.1.0" + } + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -112,11 +130,42 @@ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", "dev": true }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "dev": true, + "requires": { + "buffer-equal": "^1.0.0" + } + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, "are-we-there-yet": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", @@ -135,6 +184,114 @@ "sprintf-js": "~1.0.2" } }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "dev": true, + "requires": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, + "array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "dev": true, + "requires": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -150,6 +307,7 @@ "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "optional": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -176,16 +334,63 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async-done": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.1.tgz", + "integrity": "sha512-R1BaUeJ4PMoLNJuk+0tLJgjmEqVsdN118+Z8O+alhnQDQgy0kmD5Mqi0DNEmMx2LM0Ed5yekKu+ZXYvIHceicg==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^1.0.7", + "stream-exhaust": "^1.0.1" + }, + "dependencies": { + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + } + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, "async-limiter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" }, + "async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "dev": true, + "requires": { + "async-done": "^1.2.2" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -207,12 +412,84 @@ "js-tokens": "^3.0.2" } }, + "bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "dev": true, + "requires": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + } + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "bcrypt-pbkdf": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", @@ -222,6 +499,12 @@ "tweetnacl": "^0.14.3" } }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, "bindings": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.1.tgz", @@ -239,7 +522,8 @@ "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "optional": true }, "boom": { "version": "4.3.1", @@ -259,10 +543,40 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "optional": true }, "browser-stdout": { "version": "1.3.0", @@ -274,6 +588,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "optional": true, "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -318,6 +633,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "optional": true, "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" @@ -352,15 +668,28 @@ "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true + }, "buffer-fill": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "optional": true }, "bufferutil": { "version": "3.0.5", @@ -378,6 +707,29 @@ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -416,6 +768,34 @@ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", "dev": true }, + "chokidar": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.6.tgz", + "integrity": "sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, "chownr": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", @@ -425,11 +805,75 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "optional": true, "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", + "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -440,6 +884,27 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, + "collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "dev": true, + "requires": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", @@ -455,6 +920,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, "combined-stream": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", @@ -480,20 +951,57 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, "cookiejar": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-props": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", + "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "dev": true, + "requires": { + "each-props": "^1.3.0", + "is-plain-object": "^2.0.1" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "coveralls": { "version": "3.0.0", @@ -522,6 +1030,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "optional": true, "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", @@ -534,6 +1043,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "optional": true, "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", @@ -585,6 +1095,15 @@ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true, + "requires": { + "es5-ext": "^0.10.9" + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -608,6 +1127,18 @@ } } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, "decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", @@ -630,6 +1161,79 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "dev": true, + "requires": { + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -650,6 +1254,12 @@ "minimalistic-assert": "^1.0.0" } }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, "detect-libc": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", @@ -672,6 +1282,28 @@ "randombytes": "^2.0.0" } }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + } + }, "ecc-jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", @@ -685,6 +1317,7 @@ "version": "6.4.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "optional": true, "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -703,6 +1336,59 @@ "once": "^1.4.0" } }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.50", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", + "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "^1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -725,26 +1411,178 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "optional": true, "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" } }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "expand-template": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-1.1.1.tgz", "integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg==" }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, + "fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + } + }, "fast-deep-equal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", @@ -755,11 +1593,100 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, "flatbuffers": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/flatbuffers/-/flatbuffers-1.10.2.tgz", "integrity": "sha512-VK7lHZF/corkykjXZ0+dqViI8Wk1YpwPCFN2wrnTs+PMCMG5+uHRvkRW14fuA7Smkhkgx+Dj5UdS3YXktJL+qw==" }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -780,23 +1707,603 @@ "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, "fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, + "fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, + "optional": true, "requires": { - "aproba": "^1.0.3", + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "nan": { + "version": "2.13.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", + "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", "console-control-strings": "^1.0.0", "has-unicode": "^2.0.0", "object-assign": "^4.1.0", @@ -806,12 +2313,24 @@ "wide-align": "^1.1.0" } }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, "get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -839,12 +2358,190 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + } + }, + "glob-watcher": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz", + "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "object.defaults": "^1.1.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, "growl": { "version": "1.10.3", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", "dev": true }, + "gulp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "dev": true, + "requires": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "dependencies": { + "gulp-cli": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz", + "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.1.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.0.1", + "yargs": "^7.1.0" + } + } + } + }, + "gulp-typescript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-5.0.1.tgz", + "integrity": "sha512-YuMMlylyJtUSHG1/wuSVTrZp60k1dMEFKYOvDf7OvbAJWrDtxxD4oZon4ancdWwzjj30ztiidhe4VXJniF0pIQ==", + "dev": true, + "requires": { + "ansi-colors": "^3.0.5", + "plugin-error": "^1.0.1", + "source-map": "^0.7.3", + "through2": "^3.0.0", + "vinyl": "^2.1.0", + "vinyl-fs": "^3.0.3" + }, + "dependencies": { + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + }, + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -874,11 +2571,49 @@ "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", "dev": true }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "hash-base": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", @@ -892,6 +2627,7 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "optional": true, "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -918,6 +2654,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "optional": true, "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -929,6 +2666,21 @@ "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -959,12 +2711,179 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, - "is-fullwidth-code-point": { + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-relative": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "is-unc-path": "^1.0.0" } }, "is-typedarray": { @@ -972,11 +2891,50 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -987,6 +2945,12 @@ "resolved": "https://registry.npmjs.org/js-joda/-/js-joda-1.8.2.tgz", "integrity": "sha512-3w+3TnKqiplQyG/YQk31cBhJ/sg2Xb/fX7lneiK+z+nEjTzdfvHqJquJhtzyEA1NyLJKNpIeOQSBr3Q4nY+O8Q==" }, + "js-sha256": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", + "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==", + "dev": true + }, "js-sha3": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.6.1.tgz", @@ -1024,6 +2988,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -1040,12 +3010,90 @@ "verror": "1.10.0" } }, + "just-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", + "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "dev": true, + "requires": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, "lcov-parse": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=", "dev": true }, + "lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "dev": true, + "requires": { + "flush-write-stream": "^1.0.2" + } + }, + "liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, "lodash": { "version": "4.17.5", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", @@ -1063,10 +3111,70 @@ "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", "dev": true }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "dev": true, + "requires": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "optional": true, "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -1076,7 +3184,8 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "optional": true } } }, @@ -1085,6 +3194,27 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, "miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", @@ -1121,12 +3251,14 @@ "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "optional": true }, "minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "optional": true }, "minimatch": { "version": "3.0.4", @@ -1142,6 +3274,27 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", @@ -1207,15 +3360,40 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "dev": true + }, "nan": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==" }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, "nem2-library": { - "version": "0.9.14", - "resolved": "https://registry.npmjs.org/nem2-library/-/nem2-library-0.9.14.tgz", - "integrity": "sha512-WTWycF01RwDj9UIn0B3Gb7BIhOQszYVKi7/IzfR4mGGrxsJcmMoJ71oB0OUtjHyHv47lM6g5sk2QGu58u376sw==", + "version": "0.9.18", + "resolved": "https://registry.npmjs.org/nem2-library/-/nem2-library-0.9.18.tgz", + "integrity": "sha512-pGEw+NGGB5Ma0fri4X5A4eXVyJAljybfjliUkgBAjp7KerD5dcXTnNfnizcyigfZApISrL/v+PzCl/+rsoJs1w==", "requires": { "bufferutil": "^3.0.5", "crypto-browserify": "3.12.0", @@ -1236,6 +3414,12 @@ } } }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, "node-abi": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.7.1.tgz", @@ -1249,6 +3433,53 @@ "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "resolve": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", + "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dev": true, + "requires": { + "once": "^1.3.2" + } + }, "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", @@ -1304,6 +3535,7 @@ "version": "0.1.4", "bundled": true, "dev": true, + "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -2463,7 +4695,8 @@ "longest": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "loose-envify": { "version": "1.3.1", @@ -4046,6 +6279,105 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -4054,15 +6386,34 @@ "wrappy": "1" } }, + "ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, "parse-asn1": { "version": "5.1.4", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "optional": true, "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", @@ -4072,6 +6423,59 @@ "safe-buffer": "^5.1.1" } }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -4084,6 +6488,32 @@ "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", "dev": true }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, "pathval": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", @@ -4094,6 +6524,7 @@ "version": "3.0.17", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "optional": true, "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -4107,6 +6538,45 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, "prebuild-install": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-4.0.0.tgz", @@ -4129,6 +6599,12 @@ "which-pm-runs": "^1.0.0" } }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", @@ -4165,6 +6641,17 @@ "once": "^1.3.1" } }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", @@ -4179,6 +6666,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "optional": true, "requires": { "safe-buffer": "^5.1.0" } @@ -4204,6 +6692,27 @@ "strip-json-comments": "~2.0.1" } }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -4218,6 +6727,92 @@ "util-deprecate": "~1.0.1" } }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + } + }, + "remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "dev": true, + "requires": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + } + }, "request": { "version": "2.85.0", "resolved": "https://registry.npmjs.org/request/-/request-2.85.0.tgz", @@ -4265,6 +6860,18 @@ "tough-cookie": ">=2.3.3" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, "resolve": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz", @@ -4274,6 +6881,37 @@ "path-parse": "^1.0.5" } }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "dev": true, + "requires": { + "value-or-function": "^3.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, "ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", @@ -4288,64 +6926,300 @@ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.1.tgz", "integrity": "sha512-OwMxHxmnmHTUpgO+V7dZChf3Tixf4ih95cmXjzzadULziVl/FKhHScGLj4goEw9weePVOH2Q0+GcCBUhKCZc/g==", "requires": { - "tslib": "^1.9.0" + "tslib": "^1.9.0" + } + }, + "rxjs-compat": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.2.1.tgz", + "integrity": "sha512-Pst0lkAwVodBbBOIZic9aM1vY9asJ2u8GfKN115+goIH83PAlizJDyvixuxPAuQ1UtkmBuro7+0PqKQ3PSkhEg==" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "secure-random": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/secure-random/-/secure-random-1.1.1.tgz", + "integrity": "sha1-CIDy2MUYX0vLRoQFjINrTdsHFFo=", + "dev": true + }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + }, + "semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "dev": true, + "requires": { + "sver-compat": "^1.5.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "optional": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, + "simple-get": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", + "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "requires": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.x.x" } }, - "rxjs-compat": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.2.1.tgz", - "integrity": "sha512-Pst0lkAwVodBbBOIZic9aM1vY9asJ2u8GfKN115+goIH83PAlizJDyvixuxPAuQ1UtkmBuro7+0PqKQ3PSkhEg==" + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" - }, - "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true }, - "simple-get": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.1.tgz", - "integrity": "sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw==", + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, "requires": { - "decompress-response": "^3.3.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "spdx-license-ids": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", + "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, "requires": { - "hoek": "4.x.x" + "extend-shallow": "^3.0.0" } }, "sprintf-js": { @@ -4369,11 +7243,50 @@ "tweetnacl": "~0.14.0" } }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" }, + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", + "dev": true + }, + "stream-shift": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "dev": true + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -4405,6 +7318,15 @@ "ansi-regex": "^2.0.0" } }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -4433,6 +7355,16 @@ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true }, + "sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "dev": true, + "requires": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, "tar-fs": { "version": "1.16.3", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", @@ -4469,11 +7401,98 @@ "xtend": "^4.0.0" } }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + } + }, "to-buffer": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "dev": true, + "requires": { + "through2": "^2.0.3" + } + }, "tough-cookie": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", @@ -4650,6 +7669,12 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, "typescript": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", @@ -4665,6 +7690,138 @@ "typescript": ">= 0.8.2" } }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "undertaker": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", + "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + } + }, + "undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", + "dev": true + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", + "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", + "dev": true + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, "utf-8-validate": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-4.0.2.tgz", @@ -4707,6 +7864,31 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" }, + "v8flags": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", + "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "dev": true + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -4717,6 +7899,75 @@ "extsprintf": "^1.2.0" } }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dev": true, + "requires": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + } + }, + "vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "dev": true, + "requires": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, "which-pm-runs": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", @@ -4730,6 +7981,16 @@ "string-width": "^1.0.2 || 2" } }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -4748,6 +8009,42 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "dev": true, + "requires": { + "camelcase": "^3.0.0" + } + }, "yn": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", diff --git a/package.json b/package.json index 471ddd3e7f..3c90ef8b5f 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,10 @@ "scripts": { "pretest": "npm run build", "test": "mocha --ui bdd --recursive ./dist/test --timeout 90000", - "test:e2e": "mocha --ui bdd --recursive ./dist/e2e --timeout 90000", + "e2econfigcopy": "gulp", + "test:e2e": "npm run build && mocha --ui bdd --recursive ./dist/e2e --timeout 90000", "test:all": "mocha --ui bdd --recursive ./dist/ --timeout 90000", - "build": "rm -rf dist/ && tsc", + "build": "rm -rf dist/ && tsc && npm run e2econfigcopy", "test:cov": "nyc --reporter=lcov --reporter=text-lcov npm t && nyc report --reporter=text-lcov", "test:coveralls": "npm run test:cov | coveralls" }, @@ -41,8 +42,13 @@ "assert": "^1.4.1", "chai": "^4.1.2", "coveralls": "^3.0.0", + "gulp": "^4.0.2", + "gulp-typescript": "^5.0.1", + "js-sha256": "^0.9.0", "mocha": "^4.0.1", "nyc": "^11.3.0", + "ripemd160": "^2.0.2", + "secure-random": "^1.1.1", "ts-mockito": "^2.2.7", "ts-node": "^5.0.1", "tslint": "^5.8.0", @@ -53,7 +59,7 @@ "@types/crypto-js": "^3.1.43", "crypto-js": "^3.1.9-1", "js-joda": "^1.6.2", - "nem2-library": "^0.9.14", + "nem2-library": "0.9.18", "request": "^2.83.0", "request-promise-native": "^1.0.5", "rxjs": "^6.2.1", diff --git a/src/core/utils/DtoMapping.ts b/src/core/utils/DtoMapping.ts new file mode 100644 index 0000000000..282ecc6029 --- /dev/null +++ b/src/core/utils/DtoMapping.ts @@ -0,0 +1,53 @@ +/* + * Copyright 2019 NEM + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AccountProperties } from '../../model/account/AccountProperties'; +import { AccountPropertiesInfo } from '../../model/account/AccountPropertiesInfo'; +import { AccountProperty } from '../../model/account/AccountProperty'; +import { Address } from '../../model/account/Address'; +import { PropertyType } from '../../model/account/PropertyType'; +import { MosaicId } from '../../model/mosaic/MosaicId'; + +export class DtoMapping { + + /** + * Create AccountPropertyInfo class from Json. + * @param {object} dataJson The account property json object. + * @returns {module: model/Account/AccountPropertiesInfo} The AccountPropertiesInfo class. + */ + public static extractAccountPropertyFromDto(accountProperties): AccountPropertiesInfo { + return new AccountPropertiesInfo( + accountProperties.meta, + new AccountProperties(Address.createFromEncoded(accountProperties.accountProperties.address), + accountProperties.accountProperties.properties.map((prop) => { + switch (prop.propertyType) { + case PropertyType.AllowAddress: + case PropertyType.BlockAddress: + return new AccountProperty(prop.propertyType, + prop.values.map((value) => Address.createFromEncoded(value))); + case PropertyType.AllowMosaic: + case PropertyType.BlockMosaic: + return new AccountProperty(prop.propertyType, + prop.values.map((value) => new MosaicId(value))); + case PropertyType.AllowTransaction: + case PropertyType.BlockTransaction: + return new AccountProperty(prop.propertyType, prop.values); + default: + throw new Error(`Invalid property type: ${prop.propertyType}`); + } + }))); + } +} diff --git a/src/core/utils/utility.ts b/src/core/utils/utility.ts index 013bba3410..71274052db 100644 --- a/src/core/utils/utility.ts +++ b/src/core/utils/utility.ts @@ -15,3 +15,4 @@ */ export * from './TransactionMapping'; +export * from './DtoMapping'; diff --git a/src/infrastructure/AccountHttp.ts b/src/infrastructure/AccountHttp.ts index 9abc4b4076..d22ae319d1 100644 --- a/src/infrastructure/AccountHttp.ts +++ b/src/infrastructure/AccountHttp.ts @@ -17,6 +17,7 @@ import {AccountRoutesApi} from 'nem2-library'; import {from as observableFrom, Observable} from 'rxjs'; import {map, mergeMap} from 'rxjs/operators'; +import { DtoMapping } from '../core/utils/DtoMapping'; import {AccountInfo} from '../model/account/AccountInfo'; import { AccountPropertiesInfo } from '../model/account/AccountPropertiesInfo'; import {Address} from '../model/account/Address'; @@ -85,13 +86,10 @@ export class AccountHttp extends Http implements AccountRepository { * @param publicAccount public account * @returns Observable */ - public getAccountProperty(publicAccount: PublicAccount): Observable { - return observableFrom(this.accountRoutesApi.getAccountProperties(publicAccount.publicKey)).pipe(map((accountProperties) => { - return new AccountPropertiesInfo( - accountProperties.meta, - accountProperties.accountProperties, - ); - })); + public getAccountProperties(address: Address): Observable { + return observableFrom(this.accountRoutesApi.getAccountProperties(address.plain())).pipe(map((accountProperties) => { + return DtoMapping.extractAccountPropertyFromDto(accountProperties); + })); } /** @@ -99,15 +97,12 @@ export class AccountHttp extends Http implements AccountRepository { * @param address list of addresses * @returns Observable */ - public getAccountProperties(addresses: Address[]): Observable { + public getAccountPropertiesFromAccounts(addresses: Address[]): Observable { const accountIds = addresses.map((address) => address.plain()); return observableFrom( this.accountRoutesApi.getAccountPropertiesFromAccounts(accountIds)).pipe(map((accountProperties) => { return accountProperties.map((property) => { - return new AccountPropertiesInfo( - property.meta, - property.accountProperties, - ); + return DtoMapping.extractAccountPropertyFromDto(property); }); })); } @@ -119,7 +114,7 @@ export class AccountHttp extends Http implements AccountRepository { */ public getAccountsInfo(addresses: Address[]): Observable { const accountIdsBody = { - accountIds: addresses.map((address) => address.plain()), + addresses: addresses.map((address) => address.plain()), }; return observableFrom( this.accountRoutesApi.getAccountsInfo(accountIdsBody)).pipe(map((accountsInfoMetaDataDTO) => { diff --git a/src/infrastructure/AccountRepository.ts b/src/infrastructure/AccountRepository.ts index 7496f120c1..5f7b3a0f4e 100644 --- a/src/infrastructure/AccountRepository.ts +++ b/src/infrastructure/AccountRepository.ts @@ -51,14 +51,14 @@ export interface AccountRepository { * @param publicAccount public account * @returns Observable */ - getAccountProperty(publicAccount: PublicAccount): Observable; + getAccountProperties(address: Address): Observable; /** * Gets Account properties. * @param address list of addresses * @returns Observable */ - getAccountProperties(addresses: Address[]): Observable; + getAccountPropertiesFromAccounts(addresses: Address[]): Observable; /** * Gets a MultisigAccountInfo for an account. diff --git a/src/infrastructure/Listener.ts b/src/infrastructure/Listener.ts index 69c7760f21..a4055e4329 100644 --- a/src/infrastructure/Listener.ts +++ b/src/infrastructure/Listener.ts @@ -193,7 +193,7 @@ export class Listener { */ public terminate(): void { if (this.webSocket) { - this.webSocket.terminate(); + this.webSocket.close(); } } @@ -297,24 +297,6 @@ export class Listener { map((_) => _.message as string)); } - /** - * Return an observable of {@link ModifyMultisigAccountTransaction} for specific address which has been added to multi signatories. - * Each time an modify multi signatures transaction is announced, - * it emits a new {@link ModifyMultisigAccountTransaction} in the event stream. - * - * @param address address we listen when a transaction with missing signatures state - * @return an observable stream of ModifyMultisigAccountTransaction with missing signatures state - */ - public multisigAccountAdded(address: Address): Observable { - this.subscribeTo(`modifyMultisigAccount/${address.plain()}`); - return this.messageSubject.asObservable().pipe( - filter((_) => _.channelName === ListenerChannelName.modifyMultisigAccount), - filter((_) => _.message instanceof ModifyMultisigAccountTransaction), - map((_) => _.message as ModifyMultisigAccountTransaction), - filter((_) => this.accountAddedToMultiSig(_, address)), - ); - } - /** * Returns an observable stream of {@link TransactionStatusError} for specific address. * Each time a transaction contains an error, diff --git a/src/infrastructure/TransactionHttp.ts b/src/infrastructure/TransactionHttp.ts index 226781080b..7be541b7d0 100644 --- a/src/infrastructure/TransactionHttp.ts +++ b/src/infrastructure/TransactionHttp.ts @@ -178,6 +178,7 @@ export class TransactionHttp extends Http implements TransactionRepository { signedTx.hash, address.plain(), ); + return observableFrom( requestPromise.put({url: this.url + `/transaction/sync`, body: syncAnnounce, json: true}), ).pipe(map((response) => { diff --git a/src/infrastructure/transaction/CreateTransactionFromDTO.ts b/src/infrastructure/transaction/CreateTransactionFromDTO.ts index 0c189a2bff..5aeef71c46 100644 --- a/src/infrastructure/transaction/CreateTransactionFromDTO.ts +++ b/src/infrastructure/transaction/CreateTransactionFromDTO.ts @@ -430,11 +430,13 @@ export const extractMosaics = (mosaics: any): Mosaic[] => { */ const extractMessage = (message: any): PlainMessage | EncryptedMessage => { let msgObj = EmptyMessage; - if (message.type === MessageType.PlainMessage) { - msgObj = convert.isHexString(message) ? PlainMessage.createFromPayload(message.payload) : - PlainMessage.create(message.payload); - } else if (message.type === MessageType.EncryptedMessage) { - msgObj = EncryptedMessage.createFromPayload(message.payload); + if (message) { + if (message.type === MessageType.PlainMessage) { + msgObj = convert.isHexString(message.payload) ? PlainMessage.createFromPayload(message.payload) : + PlainMessage.create(message.payload); + } else if (message.type === MessageType.EncryptedMessage) { + msgObj = EncryptedMessage.createFromPayload(message.payload); + } } return msgObj; }; diff --git a/src/model/account/AccountPropertiesInfo.ts b/src/model/account/AccountPropertiesInfo.ts index 9e7060656e..b1c3040968 100644 --- a/src/model/account/AccountPropertiesInfo.ts +++ b/src/model/account/AccountPropertiesInfo.ts @@ -32,7 +32,7 @@ export class AccountPropertiesInfo { /** * Properties. */ - public readonly accountProperties: AccountProperties[]) { + public readonly accountProperties: AccountProperties) { } } diff --git a/src/model/transaction/HashType.ts b/src/model/transaction/HashType.ts index d05cd87ca9..df42501603 100644 --- a/src/model/transaction/HashType.ts +++ b/src/model/transaction/HashType.ts @@ -38,7 +38,7 @@ export function HashTypeLengthValidator(hashType: HashType, input: string): bool case HashType.Op_Keccak_256: return input.length === 64; case HashType.Op_Hash_160: - return input.length === 40; + return input.length === 40 || input.length === 64; default: break; } diff --git a/test/model/account/AccountPropertiesInfo.spec.ts b/test/model/account/AccountPropertiesInfo.spec.ts index 6653ce831e..dd6d298986 100644 --- a/test/model/account/AccountPropertiesInfo.spec.ts +++ b/test/model/account/AccountPropertiesInfo.spec.ts @@ -15,8 +15,12 @@ */ import {deepEqual} from 'assert'; +import { AccountProperties } from '../../../src/model/account/AccountProperties'; +import { AccountPropertiesInfo } from '../../../src/model/account/AccountPropertiesInfo'; +import { AccountProperty } from '../../../src/model/account/AccountProperty'; import {Address} from '../../../src/model/account/Address'; -import {AccountPropertiesInfo, PropertyModificationType, PropertyType } from '../../../src/model/model'; +import { PropertyModificationType } from '../../../src/model/account/PropertyModificationType'; +import { PropertyType } from '../../../src/model/account/PropertyType'; describe('AccountPropertiesInfo', () => { @@ -24,28 +28,30 @@ describe('AccountPropertiesInfo', () => { const accountPropertiesInfoDTO = { meta: {id: '12345'}, - accountProperties: [{ - address: Address.createFromEncoded('9050B9837EFAB4BBE8A4B9BB32D812F9885C00D8FC1650E142'), + accountProperties: { + address: '9050B9837EFAB4BBE8A4B9BB32D812F9885C00D8FC1650E142', properties: [{ propertyType: PropertyType.AllowAddress, values: [{modificationType: PropertyModificationType.Add, value: 'SDUP5PLHDXKBX3UU5Q52LAY4WYEKGEWC6IB3VBFM', }], }], - }], + }, }; const accountPropertiesInfo = new AccountPropertiesInfo( accountPropertiesInfoDTO.meta, - accountPropertiesInfoDTO.accountProperties, + new AccountProperties(Address.createFromEncoded(accountPropertiesInfoDTO.accountProperties.address), + accountPropertiesInfoDTO.accountProperties.properties.map((prop) => + new AccountProperty(prop.propertyType, prop.values))), ); deepEqual(accountPropertiesInfo.meta.id, accountPropertiesInfoDTO.meta.id); - deepEqual(accountPropertiesInfo.accountProperties.length, accountPropertiesInfoDTO.accountProperties.length); - deepEqual(accountPropertiesInfo.accountProperties[0].address, accountPropertiesInfoDTO.accountProperties[0].address); - deepEqual(accountPropertiesInfo.accountProperties[0].properties.length, - accountPropertiesInfoDTO.accountProperties[0].properties.length); - deepEqual(accountPropertiesInfo.accountProperties[0].properties[0].values[0], - accountPropertiesInfoDTO.accountProperties[0].properties[0].values[0]); + deepEqual(accountPropertiesInfo.accountProperties.address, + Address.createFromEncoded(accountPropertiesInfoDTO.accountProperties.address)); + deepEqual(accountPropertiesInfo.accountProperties.properties.length, + accountPropertiesInfoDTO.accountProperties.properties.length); + deepEqual(accountPropertiesInfo.accountProperties.properties[0].values[0], + accountPropertiesInfoDTO.accountProperties.properties[0].values[0]); }); }); diff --git a/test/model/account/AccountProperty.spec.ts b/test/model/account/AccountProperty.spec.ts index 9974b0243e..ffa7fa4eb6 100644 --- a/test/model/account/AccountProperty.spec.ts +++ b/test/model/account/AccountProperty.spec.ts @@ -16,21 +16,22 @@ import {deepEqual} from 'assert'; import {expect} from 'chai'; -import { AccountProperty, PropertyModificationType, PropertyType } from '../../../src/model/model'; - +import { AccountProperty } from '../../../src/model/account/AccountProperty'; +import { Address } from '../../../src/model/account/Address'; +import { PropertyType } from '../../../src/model/account/PropertyType'; describe('AccountProperty', () => { it('should createComplete an AccountProperty object', () => { const accountPropertyDTO = { propertyType: PropertyType.AllowAddress, - values: [{modificationType: PropertyModificationType.Add, - value: 'SDUP5PLHDXKBX3UU5Q52LAY4WYEKGEWC6IB3VBFM', - }], + values: ['906415867F121D037AF447E711B0F5E4D52EBBF066D96860EB'], }; const accountProperty = new AccountProperty( accountPropertyDTO.propertyType, - accountPropertyDTO.values, + accountPropertyDTO.values.map((value) => { + return Address.createFromEncoded(value); + }), ); expect(accountProperty.propertyType).to.be.equal(accountPropertyDTO.propertyType);