From 34f0b08d76b4b1e2905d60d27c6290b7b7504345 Mon Sep 17 00:00:00 2001 From: Valentin Genev Date: Sat, 23 Jan 2021 17:12:53 +0200 Subject: [PATCH 1/4] Feature/#1945 cgs2 (#2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * changes to circleci config * fixing the circleci thing * coverage scripts fixes into the package.json file * added license * testing circleci (#8) * Readme slightly updated * Slight changes to circleCI config yaml * Changes to circleCI config in coverage tests section * Testing circleci * Fixed circleci format issue * Initial changes as suggested by DA review added to API * Added unit tests * Added succesful unit test for /settlementWindows * Move Happi server as an single instance in the double verb handler * Added unit tests for Operations on /settlementWindows/{settlementWindowId} * Added more unit tests * Added last unit tests * Increased unit test to 100 percent code coverage * Added Happi pagination plugin * Removed console.log statements and added central services shared logging * Added licence block * Remove zipped swagger file as per Miguel's review * Added PR review changes , test coverage and new unit tests * Added Logger to handlers * Moved unit tests to unit test directory * Added POST operation to settlements/ * Remove blnk unit tests created by yeoman * Fixed incorrect path in handler * delete swagger-158.json * Added Dockerfile, and fixed package.json unresolved merge conflict issue. (#12) * Added Dockerfile, and fixed package.json unresolved merge conflict issue. 1. Fixed package.json unresolved merge conflict issue. 2. Added Dockerfile 3. Added some missing dependencies in package.json for production execution * added myself as a contributor :D * Moved swagger from config to interface folder, removed settlemenAPI.json as its a duplicate of swagger.json * Removed settlementAPI.json from docker file * Corrections to swagger file (#13) * Introduce corrections to swagger file * createSettlement * Updated createSettlement * Reverting back version change as per PR review * Feature/DAO and API for settlementWindows (#14) * WIP added GET for settlementWindowId * WIP added handler for GET settlementWindow by id; Added plugin for logging based on central-services.Logger * WIP added enums loading from Db on server startup * WIP load ENUMS to server.app.enums * added domain layer and changed the code structure * WIP slight change * WIP * WIP getSettlementWindow by filter - DONE * functionality finished * removed unnecessary then * some small changes * WIP * settlementEventTrigger is done * Added settlemnts get by params endpoint * Added settlemnts get by params endpoint * wip * merged with docker file * WIP * WIP * settlementWindow getById is done * settlementWindow getByParams & settlementWindow facade get by list of Ids are done * settlementWindow Close is done * wip * swagger deffinition aligned to the latest changes and small naming issue fixed * Added get settlemntById endpoint up to the facde * updated settlementWindows to latest changes * Added update settlements by ID (Put) up to dao * get settlement by id * Test get settlements by Id made changes to facde * WIP * get settlement by participantId and accountId * added a file * DAO does not throw now, if object not found * settlementWindows tested * fixed wrong version change in conflict resolution * Feature/dao and api (#15) * WIP added GET for settlementWindowId * WIP added handler for GET settlementWindow by id; Added plugin for logging based on central-services.Logger * WIP added enums loading from Db on server startup * WIP load ENUMS to server.app.enums * added domain layer and changed the code structure * WIP slight change * WIP * WIP getSettlementWindow by filter - DONE * functionality finished * removed unnecessary then * some small changes * WIP * settlementEventTrigger is done * Added settlemnts get by params endpoint * Added settlemnts get by params endpoint * wip * merged with docker file * WIP * WIP * settlementWindow getById is done * settlementWindow getByParams & settlementWindow facade get by list of Ids are done * settlementWindow Close is done * wip * swagger deffinition aligned to the latest changes and small naming issue fixed * Added get settlemntById endpoint up to the facde * updated settlementWindows to latest changes * Added update settlements by ID (Put) up to dao * get settlement by id * Test get settlements by Id made changes to facde * WIP * get settlement by participantId and accountId * added a file * DAO does not throw now, if object not found * settlementWindows tested * Changes for 6.2.1 -20180830@15H31. * Settlements - 20180830@22.57. * fixes for sequence diagram 6.2.4. * fixes and additions for 6.2.5 but not completed * added comment * fixed wrong version change in conflict resolution * changer for 6.2.5 not completed * 6.2.1 and 6.2.4 working a little better just some data inconsistency * trigger sort of working well * Feature/414 416 DAO and API (#16) * Applied standard --fix * Renamed db-model to models * Manual linter fixes * Added license information where missing * Feature/414 416 DAO and API (#17) * Finished 6.2.2. * Current dev (#18) * WIP added GET for settlementWindowId * WIP added handler for GET settlementWindow by id; Added plugin for logging based on central-services.Logger * WIP added enums loading from Db on server startup * WIP load ENUMS to server.app.enums * added domain layer and changed the code structure * WIP slight change * WIP * WIP getSettlementWindow by filter - DONE * functionality finished * removed unnecessary then * some small changes * WIP * settlementEventTrigger is done * Added settlemnts get by params endpoint * Added settlemnts get by params endpoint * wip * merged with docker file * WIP * WIP * settlementWindow getById is done * settlementWindow getByParams & settlementWindow facade get by list of Ids are done * settlementWindow Close is done * wip * swagger deffinition aligned to the latest changes and small naming issue fixed * Added get settlemntById endpoint up to the facde * updated settlementWindows to latest changes * Added update settlements by ID (Put) up to dao * get settlement by id * Test get settlements by Id made changes to facde * WIP * get settlement by participantId and accountId * added a file * DAO does not throw now, if object not found * settlementWindows tested * Changes for 6.2.1 -20180830@15H31. * Settlements - 20180830@22.57. * fixes for sequence diagram 6.2.4. * fixes and additions for 6.2.5 but not completed * added comment * fixed wrong version change in conflict resolution * changer for 6.2.5 not completed * 6.2.1 and 6.2.4 working a little better just some data inconsistency * trigger sort of working well * fixed get of index list of settlementParticipantCurrency * changes need to figure out why insert for settlementTransferParticipant doesnt work correctly * trigger event fixed * Changes for 3.5.0 release (#19) * Changes for 3.5.0 release - Fixed issue with SQL not returning current settlementWindows due to the currentDate comparison of `>` which should be `>=` - Updated version from 1.0.0 to 3.5.0 to align to our release versioning - Updated Dockerfile for the current directory and ports * Added a quick config to make deployments easier * Fixed issue with Docker file * Fixed dockerfile, and re-aligned config * Feature/414 416 dao and api (#20) * Merging functionality 6.2.2 & 6.2.5. done by @ggrg * Feature/439 Fix updateSettlementById (#21) * Resolved first two tasks * Move all to single transaction and sync with design * cloneDeep rename * Added missing changes for default.json (#22) * Feature/445 Unit Tests for central-settlement (#23) * Initialize test/ * Dummy .test.js files * Feature/445 Unit Tests for central-settlement (#24) * Initialize test/ * Dummy .test.js files * Restored test/data/ and added rc&sinon modules * istanbul: 1.1.0-alpha.1 & .istanbul.yml * Resolved most issues requested by PR review * Origin/feature/#438 remove date check (#26) * Feature/#438RemoveDateCheck * Feature/#438RemoveDateCheck * Feature/445 Unit Tests for central-settlement (#30) * Initialize test/ * Dummy .test.js files * Restored test/data/ and added rc&sinon modules * istanbul: 1.1.0-alpha.1 & .istanbul.yml * Resolved most issues requested by PR review * putById fully covered and tested * getById and getByParams fully covered and tested * models/settlement/facade.test.js completed * Unit tests added * Settlement Service unit testing completed * Settlement Window Service unit testing completed * Feature/449 Unit Tests for central-settlement II (#31) * participantCurrency & settlement model unit tests * Unit tests added * Added unit tests * Finished unit tests for story 449 * Feature/#445 unit tests for central settlement i (#32) * settlementWindow handler tested * handlers are done * merged develop and handlers tests; coverage 100% * Feature/#454 investigate settlements api failure (#33) * fixed few bugs found. try-catch and log all the things. coverage maxed out. * Incrementing version for central-settlement (#34) * Fix for issues in building docker image (#35) * Incrementing version for central-settlement * Changing docker command to use 'test' folder instead * Fixed bugs 474 & 480 (#36) * Fixed bugs 474 & 480 * Fixed unit tests and pushed coverage to 100% * Added pre-commit hooks (#37) * Increment version (#38) * Incrementing version for central-settlement * Renamed 'test' folder to 'tests' and updated corresponding references in pakage.json * Reverting the name back to 'test' for uniformity but changing docker command to use 'test' folder instead * Incrementing to 3.7.0 version * Feature/461 Settlement Transfer - Prepare & Commit (#40) * Settlement transfer prepare and commit init * Finished settelement transfer prepare & commit. Unit tests in progress * Finished settlement transfer prepare & commit * Added unit tests and coverage to 100% * Incrementing version to 3.7.1 (#41) * Incrementing version of central-settlement to 3.7.1-snapshot * fixes for circle ci builds (#42) * fixes for circle ci builds * removal of backslash * Feature/#501reformat error message (#43) * WIP * error reformatted * fixed error format * removed caret and tilde and upgraded package versions in package.json (#44) * participantPosition update for settlement account (#45) * Increment version 3.7.2 (#46) * Incrementing version to 3.7.2 * added README and APIDefinition (#39) * Incrementing version to 3.8.0 (#47) * Incrementing version to 3.8.0 * Bugfix/491 Invalid Response for GetSettlementBySettlementParticipantAccount (#49) * Fixed demo scripts to run again after changes in ml-api-adapter and central-ledger * Fix settlementTransfer demo scripts * Fix settlementTransfer demo scripts (#48) * Utilise test scripts in sequence * Implementation aligned to diagram, endpoint added, coverage 100 * Feature/528 risk managed settlement (#50) * Implemented 6.2.1, 6.3.1 & 6.3.2. Unit test fail * Implemented 6.3.3, 6.2.5. Unit tests fail * Updated demo scripts & fixed issues with transfers. Unit tests fail * Bugfix HMLNS position. Unit tests fail * Added new lines at the end of the demo scripts. Unit tests fail * Commented out variable startAfterParticipantPositionChangeId. Unit tests fail * Fixed all Inspect Code errors and warnings. Unit tests fail * Fix broken unit tests * Demo prep * Coverage to 98% * Changes according to the review * Feature/535 Settlement Transfer Abort (#51) DA review requested change of settlement states * Bugfix/526 Partial Validation (#52) * Extended validation for createSettlement operation * Hotfix for v3.10.0 release (#53) * Hotfix for v3.10.0 release - https://github.com/mojaloop/project/issues/539 - Added the package lock file * - Updated shared lib to 4.1.0 to fix for https://github.com/mojaloop/project/issues/539 * Added HUB_PARTICIPANT config (#54) * Feature/535 Settlement Transfer Abort Impl (#55) * Altered /settlements/{id} endpoint to support abort * Settlement transfer ABORT, part 1. Unit tests fail * Fixed unit tests * Prepared demo scripts, fixed minor bug * Provide full coverage * Removed .returning knex clause * feature/481UpdateSettlementBySettlementParticipant * Feature/566 Notifications for Position Updates (#57) * Produce message to notificiation topic. Unit tests fail * Fix code inaccuracy. Unit tests fail * Remove unused code. * Added stub for settlementTransferReserve * Remove unused requires * Reworked unit tests. * Corrected unit tests and provide full tests coverage * Update/update version 4.4.1 (#59) * Updating version in package.json to 4.4.1 * changed the hub name to be loaded from default.json (#58) * changed the hub name to be loaded from default.json instead of enums headers value * config wrongly used * Version change/upgrade to 5.1.0 (#60) * Updating version to 5.1.0 for the next release * Badges ! (#61) Thanks to Miguel * Fixed issue when closing unexisting window (#62) * Version change/upgrade to 5.1.1 (#63) * Incrementing version in package.json and adding badges (same as central-ledger) * Feature/507 635 Integration Tests (#64) * Init integration tests * Finished populate admin test data * Added settlements data prep integration tests * Finished close settlementWindow * SettlementTransfer to PS_TRANSFERS_RESERVED, no db checks * Advanced integration tests to PS_TRANSFERS_COMMITTED * Removed devDependency leaked-handles * Finished integration and unit tests * Update package.json and init integration-runner.sh * Amendments to integration-runner * integration-runner & circleci * Enable all in integration-runner.sh * Clean up integration-runner * Changes as requested by rmothilal * #610 announcement notifications (#65) * Announcement Notifications for Slack channel. Resolve vulnerabilities. * no message * Restored package-lock.json file. Updated central-ledger dependency to 5.2.0 to resolve vulnerabilities. * Increase version to 5.2.1 * Undo updates to .json package. Another team member is addressing the vulnerabilities currently. * Included vulnerability updates. * version to 5.2.0 * Feature/628 Node Upgrade (#66) * Init node upgrade to v10 * Upgrade hapi, install standard, repair integration-runner * Version to 5.2.1 * Upgrade to NodeJs runtime 10.x and upgrade all dependencies * fixed the bug with database join (#67) * fixed the bug with database join * upgraded the version to 5.3.0 * Bugfix/714 Settlement Transfer Fulfilment Duplicate Check (#68) * Fixed transferFulfilment issue and settlement ABORT failure. Unit tests fail * swagger.json update and unit tests fix * Fix coverage * Bump up version for next release * Updated package-lock * reset cache * Fix ml-api-adapter start failure * Updated swagger.json version as referred by documentation (#69) * Feature/724Db Object Exposed By src/lib - src/models/index.js to src/lib/db.js * hotfix/Fixed SQL Error output and improved coverage (#72) * Fixed SQL Error output and improved coverage * Updated version * Restart CI workflow * interrupt integration runner just before central-ledger health check * feature/643 Integration Tests Failure (#73) * Triggering circle CI * Exit at the beginnizg of integration-runner.sh * Added setup_remote_docker * Removed setup_remote_docker * docker ps * multiple docker ps trace * docker logs for central-ledger * central-ledger no--rm * Reverted integration-runner.sh and added centralledger-default.json * remove exit after central-ledger start * Change the base image to 10.15.3-alpine and optimize Dockerfiles (#74) * Fix broken central-settlement tests (#77) * Update central-settlement test runner for new health checks, update integration test config for central-ledger Test integration tests with v6.2.1 simulator Test integration tests with v6.2.2 simulator Try extending timeout playing around with Makefile config debugging broken tests debugging broken tests change to demo simulator Test with ml-api-adapter v6.2.1 test with central-ledger v6.2.5 test with latest simulator Test with v6.2.5 simulator, v6.3.0-snapshot for central-ledger test with v7.1.0 central-ledger Revert back to central-ledger v6.3.0-snapshot test with ml-api-adapter v6.4.0 test with ml-api-adapter v7.1.0 Updating versions, adding logs to make config, fix double slash in the callback config double check last working ml-api-adapter is v6.4.0 Update central-ledger default.json config Fix the ml-api-adapter to use the simulator health check Make the ml-api-adapter health endpoint point to the central-ledger test again with latest simulator Clean and tidy for PR * Bump package version to 7.1.0, update dependencies * run `npm audit fix` * Fix imports for @hapi packages * fix unit tests for updated imports * Update catbox-memory to @hapi/catbox-memory * Change sleepMilliseconds to 1 second to fix flaky integration tests on slower circleCI * Feature/796 improve health checks (#79) * 796 implemented new health check endpoint with db check * finish unit tests for new HealthCheck * start working on integration tests * start working on better integration test runner * Setting up docker-compose to help run integration tests interactively * Working on local integration test running * Update central-settlement test runner for new health checks, update integration test config for central-ledger Test integration tests with v6.2.1 simulator Test integration tests with v6.2.2 simulator Try extending timeout playing around with Makefile config debugging broken tests debugging broken tests change to demo simulator Test with ml-api-adapter v6.2.1 test with central-ledger v6.2.5 test with latest simulator Test with v6.2.5 simulator, v6.3.0-snapshot for central-ledger test with v7.1.0 central-ledger Revert back to central-ledger v6.3.0-snapshot test with ml-api-adapter v6.4.0 test with ml-api-adapter v7.1.0 Updating versions, adding logs to make config, fix double slash in the callback config double check last working ml-api-adapter is v6.4.0 Update central-ledger default.json config Fix the ml-api-adapter to use the simulator health check Make the ml-api-adapter health endpoint point to the central-ledger test again with latest simulator Clean and tidy for PR * Bump package version to 7.1.0, update dependencies * run `npm audit fix` * Add setup integration test * Fix imports for @hapi packages * Add back health integration tests * hacking the integration runner * working on health check * fixing health imports * fix unit tests for updated imports * Update catbox-memory to @hapi/catbox-memory * Fix linter issues * Fixing invalid integration tests * feature/801-update-ci-license-and-audit (#80) * Add npm-run-audit and license-scanner step to circleci config * Ignore minor vulnerabilities * Fixing up cache restore * testing with removing defaults step * Bugfix/894 896 hardening swagger interface (#81) * Fixing issues described by #894 and #896 * Fix standard issues (auto + manual) * #908 - Apply new FSPIOP error handling to central settlement code base (#83) * Add onboarding page * Update onboarding page per Lewis comments * Issue #908 - Apply FSPIOP error handling -update circlci config run cmd -remove package-lock.json from .gitignore -added nycrc.yml -update package.json depdendencies and scripts -update existing error handling with FSPIOPError framework -update unit tests as required by update to existing error handling with FSPIOPError framework -TODO - fix setup.test.js 2 unit tests commented out to perform commit and id.test.js 1 unit tests equal asserts commented out * Update to Story #908 Updating the ml-api-adapter configuration for integration tests based in changes made in PI 7.3 * Update to Story #908 -fix setup.test.js unit tests * Update to Story #908 -fix last broken unit test at handlers/settlements/{id}.tests.js -remove a comment * 915-Update error from internal to validation, package json versions * Add --silent flag to npm run audit:check to ensure we print valid JSON, bump package version to 7.2.1 (#82) * feature/904 Request Duplicate Check update (#96) * Settlement transfer fulfilment insert update * Fix standard and other issues * Preparing snapshot release * Bugfix/956 Settlements API errors format (#110) * Registered server plugins and fixed getSettlemendBy Id error. Unit tests fail * Change internal server errors to validation errors where applicable * Fix unit tests and add ncu pre-commit hook * Improve unit tests coverage * Remove unnecessary export * hotfix/Resolve Caching Issue Change package.json to reset cache and set as public (#113) * Updates to most dependencies, central-ledger still needs to be publis… (#142) * Updates to most dependencies, central-ledger still needs to be published. Hapi version is at 18.3.2 because of new joi changes that are breaking hapi openapi swagger import Added new logger * updated ml-api-adapter config integration test * reverted to previous joi version * updated ml-api integration test json * updated dependency versions * updated config that was missing and needed for new ml-api image * tests now run but are failing because of a data issue * updates to fix integration issues not working still * central-ledger update * 795-SetEndpointDescriptionAndUpdateSummary (#139) * feature/952 Implement ML Number Library (#149) * Implement MlNumber. Adjust tests. Fix integration-runner == issue. Upgrade deps. Bump up version * Refactor to uppercase L in MLNumber * Upgrade to latest ml-number * Updated to use the latest central-services-database with a connection… (#157) * Updated to use the latest central-services-database with a connection object Updated dependencies and new central-ledger-dependency Fixed tests * change password for integration tests as per @ggrg request * updated dependencies (#165) * Issue934-FixSetEnvVarRCAsBooleanInsteadOfString-UpdateDepsPackageVer (#176) * Issue934-FixSetEnvVarRCAsBooleanInsteadOfString-UpdateDepsPackageVer * Issue934-AddParseStringInObjectDependencyAndUpdateDeps * Issue934-ResolveVulnerabilityUpdateDependencies * Feature/1003 container scan policy (#195) * update all dependencies, bump package version to 8.5.0 * Update circleci to 2.1, work on anchore scanning and refactor * fix circleci config * add back the envs to the deploy step * remove unneeded circleci config * handle file based logging in Dockerfile, update dependencies (#199) * Add anchore summary report upload, bump package version to 8.8.0 (#230) * #1175: Upgrade to Node 12.16.0 LTS (#244) * Update CircleCI and docker scripts to use Node 12.16.0 LTS * Update dependencies and lock versions for hapi-related libraries. Resolve audit issue * Bump version * Fix integeration test * Fix unit test * Restore test npm script * Restore integration dockerfile * Settlement-v2 merge into master (#259) * feature/1095 Close Settlement Window Changes (#220) * Refactor scripts tree structure * Dependencies upgrade * Changed server setup and init. Registered Settlement Window Handler. Added CLI handler management. Shortened {id} paths. Window to PROCESSING state. Settlement window producer. Settlement window consumer. Default config added. Updated package.json scripts * Added broker service health check * SettlementWindowHandler ErrorHandling and async-retry * Fix unit tests. Coverage fails at 91.32% * SettlementWindowHandler Processing * Fix integration tests * Switched the latest release of central-services-shared * Added unit test for API index.js . Code coverage now 89.5 percent * Removed unnecessary commented lines from test * Added unit tests for lib/healthcheck * feature/1096 Create Settlement Changes #1 (#224) * Changed swagger definition * Settlement model validation. Unit tests fail * select distinct * Settlement window content validation. Fixed unit tests * Deleted code to fix the two plugin issues and unit test for Handler - index.js * feature/1097 Create Settlement Changes #2 (#225) * Implemented inserts (not tested). Changed response definition. Unit tests fail * Generate response. Validate proper implementation. Disable failing unit tests to be adjusted * feature/1099 Update Settlement by ID Changes (#229) * Implement updateSettlementByIdChanges enhancement * Entire settlement process verified using various scenarios. Corrections made where applicable * feature/1165 Unit tests for central-settlement part1 * Completed the unit test for register handlers code. * Domain settlement windows close , added unit test * Added more unit testing code to the settlement windows models facade * Added unit tests and fixed existing ones to cover unhappy lines in process * Added unit tests to shared/setup to cope with the service types * Added unit test for shared setup : handler service type - and run handler true without any modules. * Added unit test for settlement window with a handler list * Added unit test to increase code coverage for settlement window facade * Add unit test testing the settlement window state "not Processing" * Added unit test to roll back settlement window facade when error occurs * Added unit test on process to cover rollback on critical error and updated the version on central services shared to "8.8.2", * Added unit testcode to close window * Fixed the knex raw and .join isn't a function errors * Changes: - Added a unit test file and unit tests for SettlementWindow handler - Made some fixes on the SettlementWindow handler * Added last unit test on the facade. the tests are being ran in isolation still. * Added last knex builder stubs to facade unit tests * Combined the Stubs for the facade * Worked on branches to increase covereage Co-authored-by: lazolalucas * feature/1100 Settlement By Currency Wrap Up (#231) * Fixed and extended integration testing for settlement-v2 * Add anchore summary report upload, bump package version to 8.8.0 (#230) * Full coverage for domain/settlement/index & models/lib/enums * Full coverage for inculded scripts * Integration testing config to run properly * Finilize unit tests and full coverage Co-authored-by: Lewis Daly * Feature/1180 enhance get settlement windows by (#238) * Added code changes to DAO and handler to include settlementwindow content * Added code changes to DAO and handler to include settlementwindow content * Added code changes to unit test to increase code coverage * Changed code to fix the integration error * Code review changes : added SettlementWindowContentModel.getBySettlementWindowId function. Unit tests are still failing * Code review changes : Added unit test and fixed unit tests to increase code coverage. * Code review II : Removed settlement window id from response object and added settlement id to it. * Trigger a rebuild. Previous commit failed due to internet failure * Updated swagger definition with the settlementId as integer on the settlementWindowContent * Fixed vulnerabilities * feature/1211 Auto position reset (#240) * Auto position reset functionality * Re-run integration tests * Use newest central-ledger snapshot release for integration tests * feature/1209 Restrict Create Settlement (#249) * Forbid GROSS/IMMEDATE models, when creating new settlement * Corrected typo as per PR request * Feature/926 enhanced get settlement windows by params (#254) * feature/926-EnhancegetSettlementWindowsByParams - Enhanced getSettlementWindowsByParams to query with currency param - Updated the response object to include content * feature/926-EnhancegetSettlementWindowsByParams - Enhanced getSettlementWindowsByParams to query with currency param - Updated the response object to include content * feature/926-EnhancegetSettlementWindowsByParams - Enhanced getSettlementWindowsByParams to query with currency param - Updated the response object to include content * Added async-retry * - Update the facade to be able to query using currency - removed the caret sign ^ from package.json * - Trigger rebuild * Prepare version for PR against master * Trigger circle CI re-run * Downgrade @mojaloop/central-services-database due to integration tests failure * Address PR review request and update dependencies Co-authored-by: deonbotha Co-authored-by: lazolalucas Co-authored-by: Lewis Daly * Fix/1107 circleci deploy (#261) * update deploy config, bump package * bump package version * update hapi to 18.4.1 * Settlement v2 (#271) * feature/1095 Close Settlement Window Changes (#220) * Refactor scripts tree structure * Dependencies upgrade * Changed server setup and init. Registered Settlement Window Handler. Added CLI handler management. Shortened {id} paths. Window to PROCESSING state. Settlement window producer. Settlement window consumer. Default config added. Updated package.json scripts * Added broker service health check * SettlementWindowHandler ErrorHandling and async-retry * Fix unit tests. Coverage fails at 91.32% * SettlementWindowHandler Processing * Fix integration tests * Switched the latest release of central-services-shared * Added unit test for API index.js . Code coverage now 89.5 percent * Removed unnecessary commented lines from test * Added unit tests for lib/healthcheck * feature/1096 Create Settlement Changes #1 (#224) * Changed swagger definition * Settlement model validation. Unit tests fail * select distinct * Settlement window content validation. Fixed unit tests * Deleted code to fix the two plugin issues and unit test for Handler - index.js * feature/1097 Create Settlement Changes #2 (#225) * Implemented inserts (not tested). Changed response definition. Unit tests fail * Generate response. Validate proper implementation. Disable failing unit tests to be adjusted * feature/1099 Update Settlement by ID Changes (#229) * Implement updateSettlementByIdChanges enhancement * Entire settlement process verified using various scenarios. Corrections made where applicable * feature/1165 Unit tests for central-settlement part1 * Completed the unit test for register handlers code. * Domain settlement windows close , added unit test * Added more unit testing code to the settlement windows models facade * Added unit tests and fixed existing ones to cover unhappy lines in process * Added unit tests to shared/setup to cope with the service types * Added unit test for shared setup : handler service type - and run handler true without any modules. * Added unit test for settlement window with a handler list * Added unit test to increase code coverage for settlement window facade * Add unit test testing the settlement window state "not Processing" * Added unit test to roll back settlement window facade when error occurs * Added unit test on process to cover rollback on critical error and updated the version on central services shared to "8.8.2", * Added unit testcode to close window * Fixed the knex raw and .join isn't a function errors * Changes: - Added a unit test file and unit tests for SettlementWindow handler - Made some fixes on the SettlementWindow handler * Added last unit test on the facade. the tests are being ran in isolation still. * Added last knex builder stubs to facade unit tests * Combined the Stubs for the facade * Worked on branches to increase covereage Co-authored-by: lazolalucas * feature/1100 Settlement By Currency Wrap Up (#231) * Fixed and extended integration testing for settlement-v2 * Add anchore summary report upload, bump package version to 8.8.0 (#230) * Full coverage for domain/settlement/index & models/lib/enums * Full coverage for inculded scripts * Integration testing config to run properly * Finilize unit tests and full coverage Co-authored-by: Lewis Daly * Feature/1180 enhance get settlement windows by (#238) * Added code changes to DAO and handler to include settlementwindow content * Added code changes to DAO and handler to include settlementwindow content * Added code changes to unit test to increase code coverage * Changed code to fix the integration error * Code review changes : added SettlementWindowContentModel.getBySettlementWindowId function. Unit tests are still failing * Code review changes : Added unit test and fixed unit tests to increase code coverage. * Code review II : Removed settlement window id from response object and added settlement id to it. * Trigger a rebuild. Previous commit failed due to internet failure * Updated swagger definition with the settlementId as integer on the settlementWindowContent * Fixed vulnerabilities * feature/1211 Auto position reset (#240) * Auto position reset functionality * Re-run integration tests * Use newest central-ledger snapshot release for integration tests * feature/1209 Restrict Create Settlement (#249) * Forbid GROSS/IMMEDATE models, when creating new settlement * Corrected typo as per PR request * Feature/926 enhanced get settlement windows by params (#254) * feature/926-EnhancegetSettlementWindowsByParams - Enhanced getSettlementWindowsByParams to query with currency param - Updated the response object to include content * feature/926-EnhancegetSettlementWindowsByParams - Enhanced getSettlementWindowsByParams to query with currency param - Updated the response object to include content * feature/926-EnhancegetSettlementWindowsByParams - Enhanced getSettlementWindowsByParams to query with currency param - Updated the response object to include content * Added async-retry * - Update the facade to be able to query using currency - removed the caret sign ^ from package.json * - Trigger rebuild * Prepare version for PR against master * Trigger circle CI re-run * Downgrade @mojaloop/central-services-database due to integration tests failure * Address PR review request and update dependencies * Updated dependancy * Another test for integration tests * Feature/1241 get settlements by params to include currency (#268) * Re-do code changes to the updated settlements v2 * Added async-retry * Remove caret in package.json * Fixed the filtering on the settlement window(s) per settlement id, added unit test * Fixed the filtering on the settlement window(s) per settlement id, added unit test * Fixed vulnerabilities * Removed the settlement model line in the response object * Removed the settlement model line in the response object * update central ledger * Fix vulnerability * attempt to fix vulnerability * Updated Happi to version 19.1.1 * Fixed the filtering on the settlement window(s) per settlement id, added unit test * Crazy shit happening * test commit * Fixed code review changes * Re-trigger pull request * Revert Recreate DB script * Updated Hapi to LTS version * * Fixed get settlement by params * Included content on the response object * * Fixed Circle ci tests failing * Trigger a rebuild * Removed cache for dependencies under unit test/coverage * Updated circle ci config.yml * Updated circle ci config.yml Co-authored-by: deonbotha * Enhance central-settlement : Return settlement window content for every settlement window when getting settlements by id. (#263) * Re-do code changes to the updated settlements v2 * Added async-retry * Remove caret in package.json * Fixed the filtering on the settlement window(s) per settlement id, added unit test * Fixed the filtering on the settlement window(s) per settlement id, added unit test * Fixed vulnerabilities * Removed the settlement model line in the response object * Removed the settlement model line in the response object * update central ledger * Fix vulnerability * attempt to fix vulnerability * Updated Happi to version 19.1.1 * Fixed the filtering on the settlement window(s) per settlement id, added unit test * Crazy shit happening * test commit * Fixed code review changes * Re-trigger pull request * Revert Recreate DB script * Updated Hapi to LTS version * Added Neal's code review changes for pull request 263 * Update vulnerability issue * Replaced the recursive delete object logic by a "map over" * Ignore the vulnerablity rewire > eslint > espree > acorn for a week Co-authored-by: Georgi Georgiev Co-authored-by: Deon Botha Co-authored-by: lazolalucas Co-authored-by: Lewis Daly * Fixed release issues(#272) Updated package.json with the version to 9.3.0 Updated circle ci config.yml * Fixed Dockerfile to have the correct run command for the new module structure (#274) Co-authored-by: Neal Donnan * Added updated Mojaloop license (#247) **Force merging as this is a license change only** * Feature/1223 anchore policy (#292) * Add custom mojaloop policy for evaluating anchore-cli scans * run audit resolver, and ignore issues for devDependencies * updated central-services dependencies (#294) Co-authored-by: Valentin * Release/v9.5.0 (#295) * ignoring some dependencies updates due to failing tests * sorted contribs list alphabetically Co-authored-by: Valentin * Updated versions for error-handler, etc... (#302) * Updated versions for error-handler, etc... * Touched file * Touch to retrigger build * Fixed typo * Update to package.json * Added JWS tag * Changes required to get integration tests working * Feature/otc300 consume commit message (#303) * Added handler to monitor topic-notification-event * Added handler to monitor topic-notification-event * Added more code to break out vars from the msg on the notification topic * Finalize code to break out vars from the msg on the notification topic * Restructured code in the handler * Renamed fulfill to fulfil * Added initial code in the Domain to update the DB * Added Knex version of SQL statement (Promise pending error still) * Added more knex statements for the changed SQL from Micheal * Fixed the bindings error * Fixed the bindings error again * Add facade and domain code * Added Error handling * Fixed index.js * Removed unwanted code * Updated the handler register unit test * Fixed inner select error that magically started to appear * Added the status parameter * Added code to unit test transferfulfil facade * Add more code to facade unit test * Add unit test for domain/index.js * Add unit test for domain/index.js * Added unit tests to the handler * Added more unit tests to transferfulfil handler * Full code coverage achieved on the transferfulfil handler * Removed unit test on facade. TBD later * updated dependancies * Changed the port in default.json * Resolved vulnerabilities * Made some depnedancy update changes * Resloved vulnerabilities * Increased codee coverage on branches to 100% for transferFulfil handler * Fixed issue with Knex * Added filter for OTC498 * Renamed functions as per code review request * Fixed function name chnages in the unit tests * Added changes to facade unit test * Added code review change as requested by Rajiv * Added Ignores for the failing unit test on the facade * Added ignores for failing test * Added config changes for python3 dependancy * Feature/otc300 consume commit message (#305) * Added handler to monitor topic-notification-event * Added handler to monitor topic-notification-event * Added more code to break out vars from the msg on the notification topic * Finalize code to break out vars from the msg on the notification topic * Restructured code in the handler * Renamed fulfill to fulfil * Added initial code in the Domain to update the DB * Added Knex version of SQL statement (Promise pending error still) * Added more knex statements for the changed SQL from Micheal * Fixed the bindings error * Fixed the bindings error again * Add facade and domain code * Added Error handling * Fixed index.js * Removed unwanted code * Updated the handler register unit test * Fixed inner select error that magically started to appear * Added the status parameter * Added code to unit test transferfulfil facade * Add more code to facade unit test * Add unit test for domain/index.js * Add unit test for domain/index.js * Added unit tests to the handler * Added more unit tests to transferfulfil handler * Full code coverage achieved on the transferfulfil handler * Removed unit test on facade. TBD later * updated dependancies * Changed the port in default.json * Resolved vulnerabilities * Made some depnedancy update changes * Resloved vulnerabilities * Increased codee coverage on branches to 100% for transferFulfil handler * Fixed issue with Knex * Added filter for OTC498 * Renamed functions as per code review request * Fixed function name chnages in the unit tests * Added changes to facade unit test * Added code review change as requested by Rajiv * Added Ignores for the failing unit test on the facade * Added ignores for failing test * Added Config.yml chnges for Python 3 depnedancy * deleted apk -v --purge del py-pip line from config.yml * Feature/otc300 consume commit message (#306) * Added handler to monitor topic-notification-event * Added handler to monitor topic-notification-event * Added more code to break out vars from the msg on the notification topic * Finalize code to break out vars from the msg on the notification topic * Restructured code in the handler * Renamed fulfill to fulfil * Added initial code in the Domain to update the DB * Added Knex version of SQL statement (Promise pending error still) * Added more knex statements for the changed SQL from Micheal * Fixed the bindings error * Fixed the bindings error again * Add facade and domain code * Added Error handling * Fixed index.js * Removed unwanted code * Updated the handler register unit test * Fixed inner select error that magically started to appear * Added the status parameter * Added code to unit test transferfulfil facade * Add more code to facade unit test * Add unit test for domain/index.js * Add unit test for domain/index.js * Added unit tests to the handler * Added more unit tests to transferfulfil handler * Full code coverage achieved on the transferfulfil handler * Removed unit test on facade. TBD later * updated dependancies * Changed the port in default.json * Resolved vulnerabilities * Made some depnedancy update changes * Resloved vulnerabilities * Increased codee coverage on branches to 100% for transferFulfil handler * Fixed issue with Knex * Added filter for OTC498 * Renamed functions as per code review request * Fixed function name chnages in the unit tests * Added changes to facade unit test * Added code review change as requested by Rajiv * Added Ignores for the failing unit test on the facade * Added ignores for failing test * Added Config.yml chnges for Python 3 depnedancy * deleted apk -v --purge del py-pip line from config.yml * Added missing | for command in config.yml * Updated dependencies for issue: https://github.com/mojaloop/project/issues/1378 (#308) * Fix CircleCi/Python (#309) * Fixed cache issue with checksum calculation (#310) * Feature/301 enhance close settlement window (#307) * Added handler to monitor topic-notification-event * Added handler to monitor topic-notification-event * Added more code to break out vars from the msg on the notification topic * Finalize code to break out vars from the msg on the notification topic * Restructured code in the handler * Renamed fulfill to fulfil * Added initial code in the Domain to update the DB * Added Knex version of SQL statement (Promise pending error still) * Added more knex statements for the changed SQL from Micheal * Fixed the bindings error * Fixed the bindings error again * Add facade and domain code * Added Error handling * Fixed index.js * Removed unwanted code * Updated the handler register unit test * Fixed inner select error that magically started to appear * Added the status parameter * Added code to unit test transferfulfil facade * Add more code to facade unit test * Add unit test for domain/index.js * Add unit test for domain/index.js * Added unit tests to the handler * Added more unit tests to transferfulfil handler * Full code coverage achieved on the transferfulfil handler * Removed unit test on facade. TBD later * updated dependancies * Changed the port in default.json * Resolved vulnerabilities * Made some depnedancy update changes * Resloved vulnerabilities * Increased codee coverage on branches to 100% for transferFulfil handler * Fixed issue with Knex * Added filter for OTC498 * Renamed functions as per code review request * Fixed function name chnages in the unit tests * Added changes to facade unit test * Added code review change as requested by Rajiv * Added Ignores for the failing unit test on the facade * Added ignores for failing test * Added Config.yml chnges for Python 3 depnedancy * deleted apk -v --purge del py-pip line from config.yml * Added missing | for command in config.yml * Added knex statement into settlement handlet facade and index * Added failure conditions * Added last code changes * Increased code coverage with unit tests * Pushed code coverage up to 100% for the added code * Updated dependancies * Removed dependency cache line in ci/config yaml * Added processing of transfer fulfil message * Updating integration test config * Added changes from Neals branch * Updated settlement integration tests to create settlement models before transfers * Update package.json withh --production switches Co-authored-by: Neal Donnan * Feature/otc 390 implement interchange fee calculation (#311) * Initial commit * Initial commit * Added get transaction object feature * Updated unit tests * Added get transaction object feature tests * Updated tests Co-authored-by: Neal Donnan * Added scripts directory in Dockerfile * Fixed persisting of ledger entries * Changed rounding of interchange fee calculation to 2 decimals, half up * Fixed integration tests * fix for integration tests failing on latest version of simulator (#312) * Updated test images for ml-api-adapter and central-ledger for integration tests to the latest. * Made the loading of script engine scripts dynamic * Upgraded central-services-shared library to 10.5.3, bump version (#313) Co-authored-by: Claudio * Feature/otc 624 rework central settlement integration test set up (#314) * OTC-624: refactoring integration tests initial data setup * OTC-624 fixing and refactoring cleaning up * OTC-624 refactoring and cleaning up test setup * Ignoring package updates * OTC-624 reverting back merge conflict change * OTC-624 renamed scenario and fixing axios version * OTC-624 renamed folder due to order of tests * Feature/otc658 rework cgs handlers (#316) * Added transferParticipantStateChange to cli * Implemented name change transferParticipantStateChange to transfeSettlement * Added code to handlers/index.js to increase code coverage * Commented to be database transaction demarcation * FIX TransferParticipantStageChange wrong table rename * Moving script loader to utils * OTC-676 refactoring and creating transactions * OTC-676 added scriptsEngine unit tests * OTC-676 refactoring * Added missing export in facade * Fixing tests regex in package.json * fix lint * Commit: - Added unit tests for the scriptsLoader.js - Renamed transferParticipantStateChange to transferSettlement in the unit tests * Using apis to create settlement models * Moved the logic for retrieving script config to a new function : retrieveScriptConfiguration * OTC: 375 - Fixed swagger def title * OTC-715 - Implement GitLab CI/CD on the central-settlement TIPS project. * Removing CGS settlement model * Updated helm dependency update script * Fixed docker-compose setup * Started to update new transfer settlement knexes * Cleaned up the updateTransferSettlement code. * Fixed models sqls statement according to Michaels spec * Temporary change to pipeline to allow deployment to test OTC-649 * Change the sign calculating the difference between PP.value and TR.amount when updating position * #1484: Update FSPIOP API version (#321) * Update FSPIOP API version * Update package version and resolve audit issues * Temporarily resolve audit issues * Resolve audit issues * Reset package versions * Reset swagger version * Temporarily disable docker images removal after integration tests * Fix integration test config for central-ledger * Resolve audit issues. Restore integration runner * Temporarily disable docker images removal after integration test * Update dependencies, resolve audit issues, revert central-services-database to v9.2.0 * Revert hapi-openapi to v1.2.6 * Restore integration runner * Update FSPIOP API version * Bump basePath to v2, update tests * Revert "Temporary change to pipeline to allow deployment to test OTC-649" This reverts commit 0c97928a22138741e06854264574d10e04049546 * Delete StubInsertPairOfLedgerEntries.js * OTC-762 setting up jest * OTC-762 updating local config * OTC-762 attempting message push * OTC-762 sending message on kafka queue * OTC-762 adding transfer before running test * OTC-762 removed commented code * Added await for add ledger entry function and fixed CGS insert query for transferParticipant * OTC-762 updating query logic for participantPosition records * OTC-762 polishing * OTC-762 formatting * OTC-762 only adding fees for committed transfers * OTC-762 adding more error handling * OTC-762 removing calls brackets for commit function, unknown error logged * Fixed a bug in Knex statement and added chnges to knex as per story OTC649 * OTC-777 added unit tests for insert Ledger entry * Unit test update Caudio * OTC649 test mocking update * Claudio added the correct code to cover the nested knex functions * Add debug output to gitlab-ci.yml * Update README.md * Resolve audit issues (#322) * Fixed some unit tests and increased coverage * Updated dependencies * Run unit test coverage in Gitlab pipeline * Removed the insert of a SETTLED transfer state record * Move kubernetes service account configuration into same step as deployment * Updating dependency * Update README.md * Update README.md * Added try catch to scripts loader function * Fixed unit test * Temporary move of scripts * Fixed unit test coverage * Added more clever way to load scripts * Fixed settlement window content response for multiple windows * Added check for liquidity check before calculating liquidity and adjusting NET_DEBIT_CAP * Added unit test for liquidity check * Added filtering for settlementWindowContent when closing settlement windows to only add entries for ledgerAccountTypes linked to NET settlement models * #1885: Update API documentation (#330) * Update API documentation * Fix audit issues * Add unit tests * Fix integration test * Resolve audit issues * Fix audit * Remove hapi-swagger * Update deps * Minor fix * docker-compose to use personal dockerhub * test fix * chore: update license file (#329) * [Security] Bump urijs from 1.19.2 to 1.19.5 (#331) Bumps [urijs](https://github.com/medialize/URI.js) from 1.19.2 to 1.19.5. **This update includes a security fix.** - [Release notes](https://github.com/medialize/URI.js/releases) - [Changelog](https://github.com/medialize/URI.js/blob/gh-pages/CHANGELOG.md) - [Commits](https://github.com/medialize/URI.js/compare/v1.19.2...v1.19.5) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * added check for settlement model in transfersettlement handler * feat: Continious Gross Settlement * dependencies update * deleted gitlab-ci.yaml Co-authored-by: Miguel de Barros Co-authored-by: Georgi Georgiev Co-authored-by: HenkKodde <36304517+HenkKodde@users.noreply.github.com> Co-authored-by: Rajiv Mothilal Co-authored-by: Sam Co-authored-by: shashi165 <33355509+shashi165@users.noreply.github.com> Co-authored-by: Georgi Georgiev Co-authored-by: Lewis Daly Co-authored-by: Lewis Daly Co-authored-by: Juan Correa Co-authored-by: Steven Oderayi Co-authored-by: deonbotha Co-authored-by: lazolalucas Co-authored-by: Deon Botha Co-authored-by: ndonnan Co-authored-by: Neal Donnan Co-authored-by: Valentin Co-authored-by: Adrian Enns Co-authored-by: vijayg10 <33152110+vijayg10@users.noreply.github.com> Co-authored-by: Claudio Co-authored-by: Lazola Lucas Co-authored-by: Keith Douglas Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Shashikant Hirugade --- .dockerignore | 16 + .gitignore | 2 + .ncurc.yml | 12 + .nycrc.integration.yml | 22 + .nycrc.yml | 6 +- CODEOWNERS | 31 + Dockerfile | 13 +- README.md | 24 +- config/default.json | 33 + docker-compose.integration.yml | 98 +- docker-compose.yml | 84 +- docker/central-ledger/default.json | 78 +- docker/central-settlement/default.json | 2 +- docker/ml-api-adapter/default.json | 16 +- docker/wait-for/wait-for-central-ledger.sh | 13 + .../wait-for/wait-for-central-settlement.sh | 14 + docker/wait-for/wait-for-kafka.sh | 7 + docker/wait-for/wait-for-ml-api-adapter.sh | 9 + docker/wait-for/wait-for-mockserver.sh | 20 + docker/wait-for/wait-for-mysql.sh | 7 + docker/wait-for/wait-for-objstore.sh | 7 + docker/wait-for/wait-for.env | 7 + docker/wait-for/wait-for.sh | 81 + jest.coverage.config.js | 21 + jest.integration.config.js | 23 + package-lock.json | 10056 ++++++++++------ package.json | 55 +- .../interchangeFeeCalculation.js | 47 + src/domain/settlement/index.js | 18 +- src/domain/transactions/index.js | 61 + src/domain/transferSettlement/index.js | 49 + src/handlers/index.js | 17 +- src/handlers/register.js | 5 + src/handlers/transferSettlement/handler.js | 173 + src/lib/scriptEngine.js | 92 + src/lib/scriptsLoader.js | 135 + src/models/ilpPackets/ilpPacket.js | 36 + src/models/settlement/facade.js | 62 +- src/models/settlementWindow/facade.js | 5 +- src/models/settlementWindow/index.js | 1 + src/models/transferSettlement/facade.js | 305 + src/models/transferSettlement/index.js | 37 + src/shared/setup.js | 4 + test-integration.Dockerfile | 2 +- test/int/index.test.js | 238 + test/integration-config-centralledger.json | 4 +- .../integration-config-centralsettlement.json | 28 + test/integration-runner.env | 6 +- test/integration/config.js | 28 + test/integration/helpers/api.js | 153 + test/integration/helpers/models.js | 3 + test/integration/helpers/transferData.js | 4 +- test/integration/helpers/utils.js | 40 + test/integration/settlementTransfer | 665 + .../settlementTransfer.test.js | 638 + .../settlementTransferData.js | 214 + .../data/dummyFeeCalculationTestScript.js | 47 + .../data/interchangeCalculationTestScript.js | 61 + test/unit/domain/transactions/index.test.js | 128 + .../domain/transferSettlement/index.test.js | 109 + test/unit/handlers/index.test.js | 10 +- test/unit/handlers/register.test.js | 2 + .../transferSettlement/handler.test.js | 312 + test/unit/lib/scriptEngine.test.js | 174 + test/unit/lib/scriptsLoader.test.js | 291 + test/unit/models/ilpPackets/ilpPacket.test.js | 73 + test/unit/models/settlement/facade.test.js | 130 +- .../models/settlementWindow/facade.test.js | 17 +- .../models/transferSettlement/facade.test.js | 520 + 69 files changed, 11797 insertions(+), 3904 deletions(-) create mode 100644 .dockerignore create mode 100644 .ncurc.yml create mode 100644 .nycrc.integration.yml create mode 100644 CODEOWNERS create mode 100644 docker/wait-for/wait-for-central-ledger.sh create mode 100644 docker/wait-for/wait-for-central-settlement.sh create mode 100644 docker/wait-for/wait-for-kafka.sh create mode 100644 docker/wait-for/wait-for-ml-api-adapter.sh create mode 100755 docker/wait-for/wait-for-mockserver.sh create mode 100644 docker/wait-for/wait-for-mysql.sh create mode 100644 docker/wait-for/wait-for-objstore.sh create mode 100644 docker/wait-for/wait-for.env create mode 100644 docker/wait-for/wait-for.sh create mode 100644 jest.coverage.config.js create mode 100644 jest.integration.config.js create mode 100644 scripts/transferSettlementTemp/interchangeFeeCalculation.js create mode 100644 src/domain/transactions/index.js create mode 100644 src/domain/transferSettlement/index.js create mode 100644 src/handlers/transferSettlement/handler.js create mode 100644 src/lib/scriptEngine.js create mode 100644 src/lib/scriptsLoader.js create mode 100644 src/models/ilpPackets/ilpPacket.js create mode 100644 src/models/transferSettlement/facade.js create mode 100644 src/models/transferSettlement/index.js create mode 100644 test/int/index.test.js create mode 100644 test/integration/config.js create mode 100644 test/integration/helpers/api.js create mode 100644 test/integration/helpers/utils.js create mode 100644 test/integration/settlementTransfer create mode 100644 test/integration/settlement_deferred_net_scenario/settlementTransfer.test.js create mode 100644 test/integration/settlement_deferred_net_scenario/settlementTransferData.js create mode 100644 test/unit/data/dummyFeeCalculationTestScript.js create mode 100644 test/unit/data/interchangeCalculationTestScript.js create mode 100644 test/unit/domain/transactions/index.test.js create mode 100644 test/unit/domain/transferSettlement/index.test.js create mode 100644 test/unit/handlers/transferSettlement/handler.test.js create mode 100644 test/unit/lib/scriptEngine.test.js create mode 100644 test/unit/lib/scriptsLoader.test.js create mode 100644 test/unit/models/ilpPackets/ilpPacket.test.js create mode 100644 test/unit/models/transferSettlement/facade.test.js diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..8c99980a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,16 @@ +deploy/ +coverage/ +node_modules/ +.dockerignore +.editorconfig +.git/ +.gitignore +.istanbul.yml +circle.yml +docker-compose.circle.yml +docker-compose.dev.yml +docker-compose.functional.yml +docker-compose.yml +Dockerfile +LICENSE +sonar-project.properties diff --git a/.gitignore b/.gitignore index 35227d22..64128b1c 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,5 @@ jspm_packages **/*.iml .history +/.gitlab-ci.env +junit.xml diff --git a/.ncurc.yml b/.ncurc.yml new file mode 100644 index 00000000..0260be03 --- /dev/null +++ b/.ncurc.yml @@ -0,0 +1,12 @@ +{ + "reject": + [ + "mustache", + "nodemon", + "npm-check-updates", + "nyc", + "sinon", + "standard", + "tape", + ], +} diff --git a/.nycrc.integration.yml b/.nycrc.integration.yml new file mode 100644 index 00000000..ca1f45c1 --- /dev/null +++ b/.nycrc.integration.yml @@ -0,0 +1,22 @@ +temp-directory: "./.nyc_output" +check-coverage: true +per-file: true +lines: 90 +statements: 90 +functions: 90 +branches: 90 +all: true +include: [ + "src/**/*.js" +] +instrument: true +reporter: [ + "lcov", + "text-summary", + "html" +] +exclude: [ + "**/node_modules/**", + '**/migrations/**', + '**/docs/**', +] diff --git a/.nycrc.yml b/.nycrc.yml index 1330c964..ca1f45c1 100644 --- a/.nycrc.yml +++ b/.nycrc.yml @@ -9,12 +9,14 @@ all: true include: [ "src/**/*.js" ] +instrument: true reporter: [ "lcov", - "text-summary" + "text-summary", + "html" ] exclude: [ "**/node_modules/**", '**/migrations/**', - '**/docs/**' + '**/docs/**', ] diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 00000000..e0a0e429 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,31 @@ +# This is a comment. +# Each line is a file pattern followed by one or more owners. +## These owners will be the default owners for everything in +## the repo. Unless a later match takes precedence, +## @global-owner1 and @global-owner2 will be requested for +## review when someone opens a pull request. +#* @global-owner1 @global-owner2 +* @vgenev @mdebarros @elnyry-sam-k @lewisdaly @oderayi @shashi165 +## Order is important; the last matching pattern takes the most +## precedence. When someone opens a pull request that only +## modifies JS files, only @js-owner and not the global +## owner(s) will be requested for a review. +# *.js @js-owner +## You can also use email addresses if you prefer. They'll be +## used to look up users just like we do for commit author +## emails. +#*.go docs@example.com +# In this example, @doctocat owns any files in the build/logs +# directory at the root of the repository and any of its +# subdirectories. +# /build/logs/ @doctocat +## The `docs/*` pattern will match files like +## `docs/getting-started.md` but not further nested files like +## `docs/build-app/troubleshooting.md`. +# docs/* docs@example.com +## In this example, @octocat owns any file in an apps directory +## anywhere in your repository. +#apps/ @octocat +## In this example, @doctocat owns any file in the `/docs` +## directory in the root of your repository. +#/docs/ @doctocat diff --git a/Dockerfile b/Dockerfile index 76d8eed2..a4ac5c51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,22 +11,23 @@ COPY package.json package-lock.json* /opt/central-settlement/ RUN npm install COPY config /opt/central-settlement/config +COPY scripts /opt/central-settlement/scripts COPY src /opt/central-settlement/src COPY README.md /opt/central-settlement -FROM node:12.16.1-alpine +FROM builder WORKDIR /opt/central-settlement # Create empty log file & link stdout to the application log file -RUN mkdir ./logs && touch ./logs/combined.log -RUN ln -sf /dev/stdout ./logs/combined.log - +RUN mkdir ./logs && touch ./logs/combined.log \ + && ln -sf /dev/stdout ./logs/combined.log \ + && adduser -D ml-user # Create a non-root user: ml-user -RUN adduser -D ml-user +# RUN adduser -D ml-user USER ml-user COPY --chown=ml-user --from=builder /opt/central-settlement . RUN npm prune --production EXPOSE 3007 -CMD node src/api/index.js +CMD ["node" "src/handlers/index.js" "h" "--transfersettlement"] diff --git a/README.md b/README.md index 1756cef3..6f7b1baf 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,17 @@ The service manages Settlement Windows and Settlements Event Triggers and provid ## Contents: -- [Deployment](#deployment) -- [Configuration](#configuration) -- [API](#api) -- [Logging](#logging) -- [Tests](#tests) -- [Auditing Dependencies](#auditing-dependencies) -- [Container Scans](#container-scans) +- [central-settlements](#central-settlements) + - [Contents:](#contents) + - [Deployment](#deployment) + - [Configuration](#configuration) + - [Environmental variables](#environmental-variables) + - [API](#api) + - [Logging](#logging) + - [Tests](#tests) + - [Running Integration Tests interactively](#running-integration-tests-interactively) + - [Auditing Dependencies](#auditing-dependencies) + - [Container Scans](#container-scans) ## Deployment @@ -51,6 +55,10 @@ Running the tests: Tests include code coverage via istanbul. See the test/ folder for testing scripts. +Running integration tests (narrow) + + npm run test:int:new + ### Running Integration Tests interactively If you want to run integration tests in a repetitive manner, you can startup the test containers using `docker-compose`, login to running `central-settlement` container like so: @@ -92,4 +100,4 @@ If you find your release builds are failing, refer to the [container scanning](h For more information on anchore and anchore-cli, refer to: - [Anchore CLI](https://github.com/anchore/anchore-cli) - [Circle Orb Registry](https://circleci.com/orbs/registry/orb/anchore/anchore-engine) - +- diff --git a/config/default.json b/config/default.json index 476b814e..8700448d 100644 --- a/config/default.json +++ b/config/default.json @@ -31,9 +31,17 @@ "DISABLED": false, "API": { "DISABLED": false + }, + "SETTINGS": { + "SCRIPTS_FOLDER": "./scripts/transferSettlementTemp" } }, "API_DOC_ENDPOINTS_ENABLED": true, + "SWITCH_ENDPOINT": "http://localhost:3001", + "AMOUNT": { + "PRECISION": 18, + "SCALE": 4 + }, "KAFKA": { "TOPIC_TEMPLATES": { "GENERAL_TOPIC_TEMPLATE": { @@ -66,6 +74,31 @@ } } } + }, + "NOTIFICATION": { + "EVENT": { + "config": { + "options": { + "mode": 2, + "batchSize": 1, + "pollFrequency": 10, + "recursiveTimeout": 100, + "messageCharset": "utf8", + "messageAsJSON": true, + "sync": true, + "consumeTimeout": 1000 + }, + "rdkafkaConf": { + "client.id": "cs-con-transferfulfil-process", + "group.id": "cs-group-transferfulfil-process", + "metadata.broker.list": "localhost:9092", + "socket.keepalive.enable": true + }, + "topicConf": { + "auto.offset.reset": "earliest" + } + } + } } }, "PRODUCER": { diff --git a/docker-compose.integration.yml b/docker-compose.integration.yml index 7b49c495..c367f83a 100644 --- a/docker-compose.integration.yml +++ b/docker-compose.integration.yml @@ -25,7 +25,103 @@ services: - ML_API_ADAPTER_HOST=ml-api-adapter - SIMULATOR_HOST=simulator - SIMULATOR_REMOTE_HOST=simulator + - TRANSFERS_ILPPACKET=AQAAAAAAAADIEHByaXZhdGUucGF5ZWVmc3CCAiB7InRyYW5zYWN0aW9uSWQiOiIyZGY3NzRlMi1mMWRiLTRmZjctYTQ5NS0yZGRkMzdhZjdjMmMiLCJxdW90ZUlkIjoiMDNhNjA1NTAtNmYyZi00NTU2LThlMDQtMDcwM2UzOWI4N2ZmIiwicGF5ZWUiOnsicGFydHlJZEluZm8iOnsicGFydHlJZFR5cGUiOiJNU0lTRE4iLCJwYXJ0eUlkZW50aWZpZXIiOiIyNzcxMzgwMzkxMyIsImZzcElkIjoicGF5ZWVmc3AifSwicGVyc29uYWxJbmZvIjp7ImNvbXBsZXhOYW1lIjp7fX19LCJwYXllciI6eyJwYXJ0eUlkSW5mbyI6eyJwYXJ0eUlkVHlwZSI6Ik1TSVNETiIsInBhcnR5SWRlbnRpZmllciI6IjI3NzEzODAzOTExIiwiZnNwSWQiOiJwYXllcmZzcCJ9LCJwZXJzb25hbEluZm8iOnsiY29tcGxleE5hbWUiOnt9fX0sImFtb3VudCI6eyJjdXJyZW5jeSI6IlVTRCIsImFtb3VudCI6IjIwMCJ9LCJ0cmFuc2FjdGlvblR5cGUiOnsic2NlbmFyaW8iOiJERVBPU0lUIiwic3ViU2NlbmFyaW8iOiJERVBPU0lUIiwiaW5pdGlhdG9yIjoiUEFZRVIiLCJpbml0aWF0b3JUeXBlIjoiQ09OU1VNRVIiLCJyZWZ1bmRJbmZvIjp7fX19 + - TRANSFERS_FULFILMENT=XoSz1cL0tljJSCp_VtIYmPNw-zFUgGfbUqf69AagUzY + - TRANSFERS_CONDITION=HOr22-H3AfTDHrSkPjJtVPRdKouuMkDXTR4ejlQa8Ks command: - tail - -f - - /dev/null \ No newline at end of file + - /dev/null + + central-ledger: + image: mojaloop/central-ledger:latest # mojaloop/central-ledger:latest # + container_name: central-ledger-int + command: + - "sh" + - "-c" + - "sh /opt/wait-for/wait-for-central-ledger.sh && node src/api/index.js" + links: + - mysql + - kafka + depends_on: + - mysql + - kafka + ports: + - "3001:3001" + volumes: + - ./docker/central-ledger/default.json:/opt/central-ledger/config/default.json + - ./docker/wait-for:/opt/wait-for + + ml-api-adapter: + image: mojaloop/ml-api-adapter:latest + container_name: ml-api-adapter-int + command: + - "sh" + - "-c" + - "sh /opt/wait-for/wait-for-ml-api-adapter.sh && node src/api/index.js" + links: + - kafka + - central-ledger + depends_on: + - kafka + - central-ledger + ports: + - "3000:3000" + volumes: + - ./docker/ml-api-adapter/default.json:/opt/ml-api-adapter/config/default.json + - ./docker/wait-for:/opt/wait-for + + mysql: + image: mysql/mysql-server + container_name: mysql-int + ports: + - "3306:3306" + volumes: + #this fixes the permissions issue, but docker-compose up will fail on first attempt + - ./docker/sql-init/:/docker-entrypoint-initdb.d/ + environment: + - MYSQL_USER=${DBUSER:-central_ledger} + - MYSQL_PASSWORD=${DBPASS:-password} + - MYSQL_DATABASE=${DBUSER:-central_ledger} + - MYSQL_ALLOW_EMPTY_PASSWORD=true + + simulator: + image: mojaloop/simulator:latest + container_name: simulator-int + links: + - ml-api-adapter + depends_on: + - ml-api-adapter + ports: + - "8444:8444" + environment: + - TRANSFERS_ENDPOINT=http://ml-api-adapter:3000 + +# mockserver: +# image: jamesdbloom/mockserver +# container_name: cs_mockserver +# ports: +# - "1080:1080" +# +# temp_curl: +# image: byrnedo/alpine-curl +# container_name: cs_temp_curl +# links: +# - mockserver +# volumes: +# - ./docker/wait-for/wait-for-mockserver.sh:/opt/wait-for/wait-for-mockserver.sh +# entrypoint: [ "sh", "-c" ] +# command: +# - /opt/wait-for/wait-for-mockserver.sh + + kafka: + image: johnnypark/kafka-zookeeper:2.3.0 + container_name: kafka-int + # Disable kafka logging as it is far too verbose for debugging locally + logging: + driver: none + ports: + - "2181:2181" + - "9092:9092" + environment: + - ADVERTISED_HOST=kafka diff --git a/docker-compose.yml b/docker-compose.yml index 06844adf..e46d774a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,44 +4,66 @@ services: build: context: . cache_from: - - mojaloop/central-ledger + - mojaloop/ + + + latest container_name: cs_central-settlement + command: + - "sh" + - "-c" + - "sh /opt/wait-for/wait-for-central-settlement.sh && node src/api/index.js" links: - mysql - kafka + - central-ledger + depends_on: + - mysql + - kafka + - central-ledger ports: - "3007:3007" volumes: - ./docker/central-settlement/default.json:/opt/central-settlement/config/default.json - environment: - - CSL_LOG_TRANSPORT=file + - ./docker/wait-for:/opt/wait-for central-ledger: - image: mojaloop/central-ledger:latest + image: mojaloop/central-ledger:latest # mojaloop/central-ledger:latest # container_name: cs_central-ledger + command: + - "sh" + - "-c" + - "sh /opt/wait-for/wait-for-central-ledger.sh && node src/api/index.js" links: - mysql - kafka + depends_on: + - mysql + - kafka ports: - "3001:3001" volumes: - ./docker/central-ledger/default.json:/opt/central-ledger/config/default.json - environment: - - CLEDG_DATABASE_URI=mysql://central_ledger:password@mysql:3306/central_ledger - - CLEDG_SIDECAR__DISABLED=true + - ./docker/wait-for:/opt/wait-for ml-api-adapter: image: mojaloop/ml-api-adapter:latest container_name: cs_ml-api-adapter + command: + - "sh" + - "-c" + - "sh /opt/wait-for/wait-for-ml-api-adapter.sh && node src/api/index.js" links: - kafka + - central-ledger + depends_on: + - kafka + - central-ledger ports: - "3000:3000" volumes: - ./docker/ml-api-adapter/default.json:/opt/ml-api-adapter/config/default.json - command: - - "node" - - "src/api/index.js" + - ./docker/wait-for:/opt/wait-for mysql: image: mysql/mysql-server @@ -56,38 +78,38 @@ services: - MYSQL_PASSWORD=${DBPASS:-password} - MYSQL_DATABASE=${DBUSER:-central_ledger} - MYSQL_ALLOW_EMPTY_PASSWORD=true - + simulator: - image: mojaloop/simulator + image: mojaloop/simulator:latest container_name: cs_simulator links: - ml-api-adapter + depends_on: + - ml-api-adapter ports: - "8444:8444" environment: - TRANSFERS_ENDPOINT=http://ml-api-adapter:3000 - mockserver: - image: jamesdbloom/mockserver - container_name: cs_mockserver - ports: - - "1080:1080" +# mockserver: +# image: jamesdbloom/mockserver +# container_name: cs_mockserver +# ports: +# - "1080:1080" +# +# temp_curl: +# image: byrnedo/alpine-curl +# container_name: cs_temp_curl +# links: +# - mockserver +# volumes: +# - ./docker/wait-for/wait-for-mockserver.sh:/opt/wait-for/wait-for-mockserver.sh +# entrypoint: [ "sh", "-c" ] +# command: +# - /opt/wait-for/wait-for-mockserver.sh - temp_curl: - image: byrnedo/alpine-curl - container_name: cs_temp_curl - links: - - mockserver - volumes: - - ./docker/wait-for-mockserver.sh:/opt/wait-for-mockserver.sh - entrypoint: [ "sh", "-c" ] - command: - - /opt/wait-for-mockserver.sh - environment: - - MOCK_HOST=mockserver - kafka: - image: johnnypark/kafka-zookeeper + image: johnnypark/kafka-zookeeper:2.3.0 container_name: cs_kafka # Disable kafka logging as it is far too verbose for debugging locally logging: diff --git a/docker/central-ledger/default.json b/docker/central-ledger/default.json index 6f11ac68..f37aa46b 100644 --- a/docker/central-ledger/default.json +++ b/docker/central-ledger/default.json @@ -1,6 +1,23 @@ { "PORT": 3001, "HOSTNAME": "http://central-ledger", + "DATABASE": { + "DIALECT": "mysql", + "HOST": "mysql", + "PORT": 3306, + "USER": "central_ledger", + "PASSWORD": "password", + "SCHEMA": "central_ledger", + "POOL_MIN_SIZE": 10, + "POOL_MAX_SIZE": 10, + "ACQUIRE_TIMEOUT_MILLIS": 30000, + "CREATE_TIMEOUT_MILLIS": 30000, + "DESTROY_TIMEOUT_MILLIS": 5000, + "IDLE_TIMEOUT_MILLIS": 30000, + "REAP_INTERVAL_MILLIS": 1000, + "CREATE_RETRY_INTERVAL_MILLIS": 200, + "DEBUG": false + }, "MIGRATIONS": { "DISABLED": false, "RUN_DATA_MIGRATIONS": true @@ -16,17 +33,13 @@ "CONNECT_TIMEOUT": 45000, "RECONNECT_INTERVAL": 5000 }, - "DB_CONNECTION": { - "POOL_MIN": 10, - "POOL_MAX": 30 - }, "MONGODB": { - "DISABLED": false, + "DISABLED": true, "URI": "mongodb://localhost:27017/mlos" }, "ERROR_HANDLING": { "includeCauseExtension": true, - "truncateCause": false + "truncateExtensions": false }, "HANDLERS": { "DISABLED": false, @@ -70,6 +83,7 @@ ] }, "INTERNAL_TRANSFER_VALIDITY_SECONDS": "432000", + "ENABLE_ON_US_TRANSFERS": false, "CACHE": { "CACHE_ENABLED": false, "MAX_BYTE_SIZE": 10000000, @@ -103,7 +117,7 @@ "rdkafkaConf": { "client.id": "cl-con-bulk-prepare", "group.id": "cl-group-bulk-prepare", - "metadata.broker.list": "localhost:9092", + "metadata.broker.list": "kafka:9092", "socket.keepalive.enable": true }, "topicConf": { @@ -126,7 +140,7 @@ "rdkafkaConf": { "client.id": "cl-con-bulk-processing", "group.id": "cl-group-bulk-processing", - "metadata.broker.list": "localhost:9092", + "metadata.broker.list": "kafka:9092", "socket.keepalive.enable": true }, "topicConf": { @@ -149,7 +163,30 @@ "rdkafkaConf": { "client.id": "cl-con-bulk-fulfil", "group.id": "cl-group-bulk-fulfil", - "metadata.broker.list": "localhost:9092", + "metadata.broker.list": "kafka:9092", + "socket.keepalive.enable": true + }, + "topicConf": { + "auto.offset.reset": "earliest" + } + } + }, + "GET": { + "config": { + "options": { + "mode": 2, + "batchSize": 1, + "pollFrequency": 10, + "recursiveTimeout": 100, + "messageCharset": "utf8", + "messageAsJSON": true, + "sync": true, + "consumeTimeout": 1000 + }, + "rdkafkaConf": { + "client.id": "cl-con-bulk-get", + "group.id": "cl-group-bulk-get", + "metadata.broker.list": "kafka:9092", "socket.keepalive.enable": true }, "topicConf": { @@ -294,7 +331,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } } @@ -314,7 +352,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } }, @@ -332,7 +371,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } }, @@ -350,7 +390,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } } @@ -370,7 +411,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } } @@ -390,11 +432,13 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } } } } - } -} \ No newline at end of file + }, + "SETTLEMENT_MODELS": [ "DEFERREDNET" ] +} diff --git a/docker/central-settlement/default.json b/docker/central-settlement/default.json index 14848c76..be9fd5c8 100644 --- a/docker/central-settlement/default.json +++ b/docker/central-settlement/default.json @@ -59,4 +59,4 @@ } } } -} \ No newline at end of file +} diff --git a/docker/ml-api-adapter/default.json b/docker/ml-api-adapter/default.json index fd9a8b64..70cccda7 100644 --- a/docker/ml-api-adapter/default.json +++ b/docker/ml-api-adapter/default.json @@ -1,8 +1,8 @@ { "PORT": 3000, "HOSTNAME": "http://ml-api-adapter", - "ENDPOINT_SOURCE_URL": "http://localhost:3001", - "ENDPOINT_HEALTH_URL": "http://localhost:3001/health", + "ENDPOINT_SOURCE_URL": "http://central-ledger:3001", + "ENDPOINT_HEALTH_URL": "http://central-ledger:3001/health", "ENDPOINT_CACHE_CONFIG": { "expiresIn": 180000, "generateTimeout": 30000 @@ -22,9 +22,10 @@ "TRANSFERS": { "SEND_TRANSFER_CONFIRMATION_TO_PAYEE": true }, + "STRIP_UNKNOWN_HEADERS": false, "ERROR_HANDLING": { "includeCauseExtension": false, - "truncateCause": true + "truncateExtensions": true }, "AMOUNT": { "PRECISION": 10, @@ -98,7 +99,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } }, @@ -116,7 +118,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } }, @@ -134,7 +137,8 @@ "queue.buffering.max.messages": 10000000 }, "topicConf": { - "request.required.acks": "all" + "request.required.acks": "all", + "partitioner": "murmur2_random" } } } diff --git a/docker/wait-for/wait-for-central-ledger.sh b/docker/wait-for/wait-for-central-ledger.sh new file mode 100644 index 00000000..e29c9103 --- /dev/null +++ b/docker/wait-for/wait-for-central-ledger.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +echo "** STARTUP - Checking for Central-Ledger..." + +source /opt/wait-for/wait-for.env + +sh /opt/wait-for/wait-for-mysql.sh + +sh /opt/wait-for/wait-for-kafka.sh + +#sh /opt/wait-for/wait-for-objstore.sh + +echo "** STARTUP - Central-Ledger successful!" diff --git a/docker/wait-for/wait-for-central-settlement.sh b/docker/wait-for/wait-for-central-settlement.sh new file mode 100644 index 00000000..cf2e1ffa --- /dev/null +++ b/docker/wait-for/wait-for-central-settlement.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +echo "** STARTUP - Checking for Central-Settlement..." + +source /opt/wait-for/wait-for.env + +sh /opt/wait-for/wait-for-mysql.sh + +sh /opt/wait-for/wait-for-kafka.sh + +# We need to wait for central-ledger since this runs the migrations etc. +sh /opt/wait-for/wait-for.sh $WAIT_FOR_CENTRAL_LEDGER_SERVER -t 240 -- echo "** STARTUP - central-ledger connection successful!" + +echo "** STARTUP - Central-Settlement successful!" diff --git a/docker/wait-for/wait-for-kafka.sh b/docker/wait-for/wait-for-kafka.sh new file mode 100644 index 00000000..d607e6fd --- /dev/null +++ b/docker/wait-for/wait-for-kafka.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +echo "** STARTUP - Checking for Broker connection..." + +source /opt/wait-for/wait-for.env + +sh /opt/wait-for/wait-for.sh $WAIT_FOR_KAFKA_BROKER -t 240 -- echo "** STARTUP - Kafka connection successful!" diff --git a/docker/wait-for/wait-for-ml-api-adapter.sh b/docker/wait-for/wait-for-ml-api-adapter.sh new file mode 100644 index 00000000..f968ae5e --- /dev/null +++ b/docker/wait-for/wait-for-ml-api-adapter.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +echo "** STARTUP - Checking for ML-API-Adapter..." + +source /opt/wait-for/wait-for.env + +sh /opt/wait-for/wait-for-kafka.sh + +echo "** STARTUP - ML-API-Adapter successful!" diff --git a/docker/wait-for/wait-for-mockserver.sh b/docker/wait-for/wait-for-mockserver.sh new file mode 100755 index 00000000..1cf21be7 --- /dev/null +++ b/docker/wait-for/wait-for-mockserver.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# wait-for-mockserver.sh + +source /opt/wait-for/wait-for.env + +function healthCheck() { + curl -s -X GET "http://$WAIT_FOR_MOCK_SERVER" +} + +function command() { + curl -s -X PUT "http://$WAIT_FOR_MOCK_SERVER/expectation" -d '{ "httpRequest": { "method": ".*", "path": "/.*transfers.*" }, "times" : { "remainingTimes" : 0, "unlimited" : true }, "timeToLive" : { "unlimited" : true }, "httpResponse": { "statusCode": 200, "body": "{}" } }'; +} + +until healthCheck; do + >&2 echo "mockserver is unavailable - sleeping" + sleep 1 +done + +>&2 echo "mockserver is up - executing command" +command diff --git a/docker/wait-for/wait-for-mysql.sh b/docker/wait-for/wait-for-mysql.sh new file mode 100644 index 00000000..04b4bffd --- /dev/null +++ b/docker/wait-for/wait-for-mysql.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +echo "** STARTUP - Checking for DB connection..." + +source /opt/wait-for/wait-for.env + +sh /opt/wait-for/wait-for.sh $WAIT_FOR_DB_SERVER -t 240 -- echo "** STARTUP - DB connection successful!" diff --git a/docker/wait-for/wait-for-objstore.sh b/docker/wait-for/wait-for-objstore.sh new file mode 100644 index 00000000..ea4b7a79 --- /dev/null +++ b/docker/wait-for/wait-for-objstore.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +echo "** STARTUP - Checking for Object Store connection..." + +source /opt/wait-for/wait-for.env + +sh /opt/wait-for/wait-for.sh $WAIT_FOR_OBJSTORE_SERVER -t 240 -- echo "** STARTUP - Object Store connection successful!" diff --git a/docker/wait-for/wait-for.env b/docker/wait-for/wait-for.env new file mode 100644 index 00000000..86cc369c --- /dev/null +++ b/docker/wait-for/wait-for.env @@ -0,0 +1,7 @@ +# Environment config for wait-for scripts + +WAIT_FOR_DB_SERVER=mysql:3306 +WAIT_FOR_OBJSTORE_SERVER=objstore:27017 +WAIT_FOR_KAFKA_BROKER=kafka:9092 +WAIT_FOR_MOCK_SERVER=mockserver:1080 +WAIT_FOR_CENTRAL_LEDGER_SERVER=central-ledger:3001 diff --git a/docker/wait-for/wait-for.sh b/docker/wait-for/wait-for.sh new file mode 100644 index 00000000..eb82060c --- /dev/null +++ b/docker/wait-for/wait-for.sh @@ -0,0 +1,81 @@ +#!/bin/sh + +# Script from https://github.com/eficode/wait-for + +TIMEOUT=15 +QUIET=0 + +echoerr() { + if [ "$QUIET" -ne 1 ]; then printf "%s\n" "$*" 1>&2; fi +} + +usage() { + exitcode="$1" + cat << USAGE >&2 +Usage: + $cmdname host:port [-t timeout] [-- command args] + -q | --quiet Do not output any status messages + -t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout + -- COMMAND ARGS Execute command with args after the test finishes +USAGE + exit "$exitcode" +} + +wait_for() { + for i in `seq $TIMEOUT` ; do + nc -z "$HOST" "$PORT" > /dev/null 2>&1 + + result=$? + if [ $result -eq 0 ] ; then + if [ $# -gt 0 ] ; then + exec "$@" + fi + exit 0 + fi + sleep 1 + done + echo "Operation timed out" >&2 + exit 1 +} + +while [ $# -gt 0 ] +do + case "$1" in + *:* ) + HOST=$(printf "%s\n" "$1"| cut -d : -f 1) + PORT=$(printf "%s\n" "$1"| cut -d : -f 2) + shift 1 + ;; + -q | --quiet) + QUIET=1 + shift 1 + ;; + -t) + TIMEOUT="$2" + if [ "$TIMEOUT" = "" ]; then break; fi + shift 2 + ;; + --timeout=*) + TIMEOUT="${1#*=}" + shift 1 + ;; + --) + shift + break + ;; + --help) + usage 0 + ;; + *) + echoerr "Unknown argument: $1" + usage 1 + ;; + esac +done + +if [ "$HOST" = "" -o "$PORT" = "" ]; then + echoerr "Error: you need to provide a host and port to test." + usage 2 +fi + +wait_for "$@" diff --git a/jest.coverage.config.js b/jest.coverage.config.js new file mode 100644 index 00000000..ae3ab409 --- /dev/null +++ b/jest.coverage.config.js @@ -0,0 +1,21 @@ +'use strict' + +module.exports = { + verbose: true, + // preset: 'ts-jest', + testEnvironment: 'node', + collectCoverage: true, + testPathIgnorePatterns: ['/test/integration/'], + collectCoverageFrom: ['./src/**/*.js'], + coverageReporters: ['json', 'lcov', 'text'], + clearMocks: false, + coverageThreshold: { + global: { + statements: 90, + functions: 90, + branches: 90, + lines: 90 + } + }, + reporters: ['jest-junit', 'default'] +} diff --git a/jest.integration.config.js b/jest.integration.config.js new file mode 100644 index 00000000..a4cead76 --- /dev/null +++ b/jest.integration.config.js @@ -0,0 +1,23 @@ +'use strict' + +module.exports = { + verbose: true, + // preset: 'ts-jest', + testEnvironment: 'node', + collectCoverage: true, + collectCoverageFrom: ['./src/**/*.js'], + coverageReporters: ['json', 'lcov', 'text', 'html'], + clearMocks: false, + coverageThreshold: { + /* Adjust accordingly when integration testing is phased in. */ + global: { + statements: 0, + functions: 0, + branches: 0, + lines: 0 + } + }, + // globalSetup: '/test/int/global_setup.js', + // globalTeardown: '/test/int/global_tear_down.js', + reporters: ['jest-junit', 'default'] +} diff --git a/package-lock.json b/package-lock.json index f34014cb..3aa0ead7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "central-settlement", - "version": "11.0.2", + "version": "12.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -63,180 +63,178 @@ } }, "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "requires": { "@babel/highlight": "^7.10.4" } }, "@babel/core": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.1.tgz", - "integrity": "sha512-XqF7F6FWQdKGGWAzGELL+aCO1p+lRY5Tj5/tbT3St1G8NaH70jhhDIKknIZaDans0OQBG5wRAldROLHSt44BgQ==", + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz", + "integrity": "sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.0", - "@babel/helper-module-transforms": "^7.11.0", - "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.11.1", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.11.0", - "@babel/types": "^7.11.0", + "@babel/generator": "^7.12.10", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.10", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.10", + "@babel/types": "^7.12.10", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", "json5": "^2.1.2", "lodash": "^4.17.19", - "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, "@babel/generator": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz", - "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz", + "integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==", "dev": true, "requires": { - "@babel/types": "^7.11.0", + "@babel/types": "^7.12.11", "jsesc": "^2.5.1", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", - "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz", + "integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/helper-get-function-arity": "^7.12.10", + "@babel/template": "^7.12.7", + "@babel/types": "^7.12.11" } }, "@babel/helper-get-function-arity": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", - "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz", + "integrity": "sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.10" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz", - "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", + "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==", "dev": true, "requires": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.12.7" } }, "@babel/helper-module-imports": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", - "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.5" } }, "@babel/helper-module-transforms": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz", - "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", - "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-simple-access": "^7.12.1", "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/helper-validator-identifier": "^7.10.4", "@babel/template": "^7.10.4", - "@babel/types": "^7.11.0", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", "lodash": "^4.17.19" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - } } }, "@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "version": "7.12.10", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz", + "integrity": "sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.10" } }, - "@babel/helper-replace-supers": { + "@babel/helper-plugin-utils": { "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", - "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + }, + "@babel/helper-replace-supers": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz", + "integrity": "sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.4", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/helper-member-expression-to-functions": "^7.12.7", + "@babel/helper-optimise-call-expression": "^7.12.10", + "@babel/traverse": "^7.12.10", + "@babel/types": "^7.12.11" } }, "@babel/helper-simple-access": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", - "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", "dev": true, "requires": { - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.1" } }, "@babel/helper-split-export-declaration": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", - "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz", + "integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==", "dev": true, "requires": { - "@babel/types": "^7.11.0" + "@babel/types": "^7.12.11" } }, "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==" + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" }, "@babel/helpers": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", - "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", + "integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==", "dev": true, "requires": { "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" } }, "@babel/highlight": { @@ -250,11 +248,119 @@ } }, "@babel/parser": { - "version": "7.11.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.2.tgz", - "integrity": "sha512-Vuj/+7vLo6l1Vi7uuO+1ngCDNeVmNbTngcJFKCR/oEtz8tKz0CJxZEGmPt9KcIloZhOZ3Zit6xbpXT2MDlS9Vw==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz", + "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==", "dev": true }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz", + "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz", + "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/runtime": { "version": "7.12.5", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", @@ -264,40 +370,40 @@ } }, "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", + "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7" } }, "@babel/traverse": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz", - "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==", + "version": "7.12.12", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz", + "integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.0", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.11.0", - "@babel/types": "^7.11.0", + "@babel/code-frame": "^7.12.11", + "@babel/generator": "^7.12.11", + "@babel/helper-function-name": "^7.12.11", + "@babel/helper-split-export-declaration": "^7.12.11", + "@babel/parser": "^7.12.11", + "@babel/types": "^7.12.12", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "globals": { @@ -306,31 +412,39 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, "@babel/types": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz", - "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==", + "version": "7.12.12", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", + "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.4", + "@babel/helper-validator-identifier": "^7.12.11", "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - } + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@cnakazawa/watch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", + "dev": true, + "requires": { + "exec-sh": "^0.3.2", + "minimist": "^1.2.0" } }, "@dabh/diagnostics": { @@ -373,18 +487,6 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -394,6 +496,12 @@ "ms": "2.1.2" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -417,27 +525,12 @@ } }, "@hapi/accept": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-3.2.4.tgz", - "integrity": "sha512-soThGB+QMgfxlh0Vzhzlf3ZOEOPk5biEwcOXhkF0Eedqx8VnhGiggL9UYHrIsOb1rUg3Be3K8kp0iDL2wbVSOQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.1.tgz", + "integrity": "sha512-fMr4d7zLzsAXo28PRRQPXR1o2Wmu+6z+VY1UzDp0iFo13Twj8WePakwXBiqn3E1aAlTpSNzCXdnnQXFhst8h8Q==", "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x", + "@hapi/hoek": "9.x.x" } }, "@hapi/address": { @@ -449,33 +542,19 @@ } }, "@hapi/ammo": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-3.1.2.tgz", - "integrity": "sha512-ej9OtFmiZv1qr45g1bxEZNGyaR4jRpyMxU6VhbxjaYThymvOwsyIsUKMZnP5Qw2tfYFuwqCJuIBHGpeIbdX9gQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-5.0.1.tgz", + "integrity": "sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==", "requires": { - "@hapi/hoek": "8.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/hoek": "9.x.x" } }, "@hapi/b64": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-4.2.1.tgz", - "integrity": "sha512-zqHpQuH5CBMw6hADzKfU/IGNrxq1Q+/wTYV+OiZRQN9F3tMyk+9BUMeBvFRMamduuqL8iSp62QAnJ+7ATiYLWA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz", + "integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==", "requires": { - "@hapi/hoek": "8.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/hoek": "9.x.x" } }, "@hapi/basic": { @@ -488,90 +567,45 @@ } }, "@hapi/boom": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.0.0.tgz", - "integrity": "sha512-D+Or4yahLq3L7D1Jf0fR1+Lgr+HPK1lej8tc6hS/fBLmK66XdpvTyKv8YUR5ls1GeQy+KGtbpKAs+ZxyzNtUyA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.0.tgz", + "integrity": "sha512-4nZmpp4tXbm162LaZT45P7F7sgiem8dwAh2vHWT6XX24dozNjGMg6BvKCRvtCUcmcXqeMIUqWN8Rc5X8yKuROQ==", "requires": { "@hapi/hoek": "9.x.x" } }, "@hapi/bounce": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-1.3.2.tgz", - "integrity": "sha512-3bnb1AlcEByFZnpDIidxQyw1Gds81z/1rSqlx4bIEE+wUN0ATj0D49B5cE1wGocy90Rp/de4tv7GjsKd5RQeew==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-2.0.0.tgz", + "integrity": "sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==", "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "^8.3.1" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x", + "@hapi/hoek": "9.x.x" } }, "@hapi/bourne": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", - "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.0.0.tgz", + "integrity": "sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==" }, "@hapi/call": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/@hapi/call/-/call-5.1.3.tgz", - "integrity": "sha512-5DfWpMk7qZiYhvBhM5oUiT4GQ/O8a2rFR121/PdwA/eZ2C1EsuD547ZggMKAR5bZ+FtxOf0fdM20zzcXzq2mZA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.1.tgz", + "integrity": "sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==", "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x", + "@hapi/hoek": "9.x.x" } }, "@hapi/catbox": { - "version": "10.2.3", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-10.2.3.tgz", - "integrity": "sha512-kN9hXO4NYyOHW09CXiuj5qW1syc/0XeVOBsNNk0Tz89wWNQE5h21WF+VsfAw3uFR8swn/Wj3YEVBnWqo82m/JQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.1.tgz", + "integrity": "sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==", "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x", - "@hapi/podium": "3.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x", + "@hapi/hoek": "9.x.x", + "@hapi/podium": "4.x.x", + "@hapi/validate": "1.x.x" } }, "@hapi/catbox-memory": { @@ -584,55 +618,25 @@ } }, "@hapi/content": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@hapi/content/-/content-4.1.1.tgz", - "integrity": "sha512-3TWvmwpVPxFSF3KBjKZ8yDqIKKZZIm7VurDSweYpXYENZrJH3C1hd1+qEQW9wQaUaI76pPBLGrXl6I3B7i3ipA==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@hapi/content/-/content-5.0.2.tgz", + "integrity": "sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==", "requires": { - "@hapi/boom": "7.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x" } }, "@hapi/cryptiles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-4.2.1.tgz", - "integrity": "sha512-XoqgKsHK0l/VpqPs+tr6j6vE+VQ3+2bkF2stvttmc7xAOf1oSAwHcJ0tlp/6MxMysktt1IEY0Csy3khKaP9/uQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz", + "integrity": "sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==", "requires": { - "@hapi/boom": "7.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x" } }, "@hapi/file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@hapi/file/-/file-1.0.0.tgz", - "integrity": "sha512-Bsfp/+1Gyf70eGtnIgmScvrH8sSypO3TcK3Zf0QdHnzn/ACnAkI6KLtGACmNRPEzzIy+W7aJX5E+1fc9GwIABQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@hapi/file/-/file-2.0.0.tgz", + "integrity": "sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ==" }, "@hapi/formula": { "version": "2.0.0", @@ -651,235 +655,98 @@ } }, "@hapi/hapi": { - "version": "18.4.1", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-18.4.1.tgz", - "integrity": "sha512-9HjVGa0Z4Qv9jk9AVoUdJMQLA+KuZ+liKWyEEkVBx3e3H1F0JM6aGbPkY9jRfwsITBWGBU2iXazn65SFKSi/tg==", - "requires": { - "@hapi/accept": "^3.2.4", - "@hapi/ammo": "^3.1.2", - "@hapi/boom": "7.x.x", - "@hapi/bounce": "1.x.x", - "@hapi/call": "^5.1.3", - "@hapi/catbox": "10.x.x", - "@hapi/catbox-memory": "4.x.x", - "@hapi/heavy": "6.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/joi": "15.x.x", - "@hapi/mimos": "4.x.x", - "@hapi/podium": "3.x.x", - "@hapi/shot": "4.x.x", - "@hapi/somever": "2.x.x", - "@hapi/statehood": "6.x.x", - "@hapi/subtext": "^6.1.3", - "@hapi/teamwork": "3.x.x", - "@hapi/topo": "3.x.x" - }, - "dependencies": { - "@hapi/address": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", - "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==" - }, - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/catbox-memory": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-4.1.1.tgz", - "integrity": "sha512-T6Hdy8DExzG0jY7C8yYWZB4XHfc0v+p1EGkwxl2HoaPYAmW7I3E59M/IvmSVpis8RPcIoBp41ZpO2aZPBpM2Ww==", - "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - }, - "@hapi/joi": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz", - "integrity": "sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==", - "requires": { - "@hapi/address": "2.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/topo": "3.x.x" - } - }, - "@hapi/topo": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", - "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", - "requires": { - "@hapi/hoek": "^8.3.0" - } - } + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-19.2.0.tgz", + "integrity": "sha512-Isf/BUPQMRMYK+xx4y2B05lrrGw6PSbJKytk1SlaXeV7tXm6m+6tFRBog6c/na0QNgojafb0bjMB+vBg64CwUA==", + "requires": { + "@hapi/accept": "^5.0.1", + "@hapi/ammo": "^5.0.1", + "@hapi/boom": "9.x.x", + "@hapi/bounce": "2.x.x", + "@hapi/call": "8.x.x", + "@hapi/catbox": "^11.1.0", + "@hapi/catbox-memory": "5.x.x", + "@hapi/heavy": "7.x.x", + "@hapi/hoek": "9.x.x", + "@hapi/joi": "17.x.x", + "@hapi/mimos": "5.x.x", + "@hapi/podium": "4.x.x", + "@hapi/shot": "5.x.x", + "@hapi/somever": "3.x.x", + "@hapi/statehood": "^7.0.2", + "@hapi/subtext": "^7.0.3", + "@hapi/teamwork": "4.x.x", + "@hapi/topo": "5.x.x" } }, "@hapi/heavy": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-6.2.2.tgz", - "integrity": "sha512-PY1dCCO6dsze7RlafIRhTaGeyTgVe49A/lSkxbhKGjQ7x46o/OFf7hLiRqTCDh3atcEKf6362EaB3+kTUbCsVA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.1.tgz", + "integrity": "sha512-vJ/vzRQ13MtRzz6Qd4zRHWS3FaUc/5uivV2TIuExGTM9Qk+7Zzqj0e2G7EpE6KztO9SalTbiIkTh7qFKj/33cA==", "requires": { - "@hapi/boom": "7.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x", + "@hapi/hoek": "9.x.x", + "@hapi/validate": "1.x.x" } }, "@hapi/hoek": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.0.4.tgz", - "integrity": "sha512-EwaJS7RjoXUZ2cXXKZZxZqieGtc7RbvQhUy8FwDoMQtxWVi14tFjeFCYPZAM1mBCpOpiBpyaZbb9NeHc7eGKgw==" + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.1.1.tgz", + "integrity": "sha512-CAEbWH7OIur6jEOzaai83jq3FmKmv4PmX1JYfs9IrYcGEVI/lyL1EXJGCj7eFVJ0bg5QR8LMxBlEtA+xKiLpFw==" }, "@hapi/inert": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@hapi/inert/-/inert-5.2.2.tgz", - "integrity": "sha512-8IaGfAEF8SwZtpdaTq0G3aDPG35ZTfWKjnMNniG2N3kE+qioMsBuImIGxna8TNQ+sYMXYK78aqmvzbQHno8qSQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@hapi/inert/-/inert-6.0.1.tgz", + "integrity": "sha512-oLxAmtWni3nH4INU2gcXFnHBw0GhHYF3HR71hAWrPc91dq+iFYGfawfaMbonwGr5DkzFiGe8Ir5sZAt2AqeINA==", "requires": { - "@hapi/ammo": "3.x.x", - "@hapi/boom": "7.x.x", - "@hapi/bounce": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x", - "lru-cache": "4.1.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/ammo": "5.x.x", + "@hapi/boom": "9.x.x", + "@hapi/bounce": "2.x.x", + "@hapi/hoek": "9.x.x", + "@hapi/joi": "17.x.x", + "lru-cache": "5.x.x" } }, "@hapi/iron": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-5.1.4.tgz", - "integrity": "sha512-+ElC+OCiwWLjlJBmm8ZEWjlfzTMQTdgPnU/TsoU5QsktspIWmWi9IU4kU83nH+X/SSya8TP8h8P11Wr5L7dkQQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-6.0.0.tgz", + "integrity": "sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==", "requires": { - "@hapi/b64": "4.x.x", - "@hapi/boom": "7.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/cryptiles": "4.x.x", - "@hapi/hoek": "8.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/b64": "5.x.x", + "@hapi/boom": "9.x.x", + "@hapi/bourne": "2.x.x", + "@hapi/cryptiles": "5.x.x", + "@hapi/hoek": "9.x.x" } }, "@hapi/joi": { - "version": "16.1.8", - "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.8.tgz", - "integrity": "sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg==", + "version": "17.1.1", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-17.1.1.tgz", + "integrity": "sha512-p4DKeZAoeZW4g3u7ZeRo+vCDuSDgSvtsB/NpfjXEHTUjSeINAi/RrVOWiVQ1isaoLzMvFEhe8n5065mQq1AdQg==", "requires": { - "@hapi/address": "^2.1.2", - "@hapi/formula": "^1.2.0", - "@hapi/hoek": "^8.2.4", - "@hapi/pinpoint": "^1.0.2", - "@hapi/topo": "^3.1.3" - }, - "dependencies": { - "@hapi/address": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", - "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==" - }, - "@hapi/formula": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-1.2.0.tgz", - "integrity": "sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA==" - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - }, - "@hapi/pinpoint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-1.0.2.tgz", - "integrity": "sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ==" - }, - "@hapi/topo": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz", - "integrity": "sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==", - "requires": { - "@hapi/hoek": "^8.3.0" - } - } + "@hapi/address": "^4.0.1", + "@hapi/formula": "^2.0.0", + "@hapi/hoek": "^9.0.0", + "@hapi/pinpoint": "^2.0.0", + "@hapi/topo": "^5.0.0" } }, "@hapi/mimos": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-4.1.1.tgz", - "integrity": "sha512-CXoi/zfcTWfKYX756eEea8rXJRIb9sR4d7VwyAH9d3BkDyNgAesZxvqIdm55npQc6S9mU3FExinMAQVlIkz0eA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-5.0.0.tgz", + "integrity": "sha512-EVS6wJYeE73InTlPWt+2e3Izn319iIvffDreci3qDNT+t3lA5ylJ0/SoTaID8e0TPNUkHUSsgJZXEmLHvoYzrA==", "requires": { - "@hapi/hoek": "8.x.x", + "@hapi/hoek": "9.x.x", "mime-db": "1.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } } }, "@hapi/nigel": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-3.1.1.tgz", - "integrity": "sha512-R9YWx4S8yu0gcCBrMUDCiEFm1SQT895dMlYoeNBp8I6YhF1BFF1iYPueKA2Kkp9BvyHdjmvrxCOns7GMmpl+Fw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.2.tgz", + "integrity": "sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==", "requires": { - "@hapi/hoek": "8.x.x", - "@hapi/vise": "3.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/hoek": "^9.0.4", + "@hapi/vise": "^4.0.0" } }, "@hapi/oppsy": { @@ -891,30 +758,15 @@ } }, "@hapi/pez": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-4.1.2.tgz", - "integrity": "sha512-8zSdJ8cZrJLFldTgwjU9Fb1JebID+aBCrCsycgqKYe0OZtM2r3Yv3aAwW5z97VsZWCROC1Vx6Mdn4rujh5Ktcg==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.0.3.tgz", + "integrity": "sha512-mpikYRJjtrbJgdDHG/H9ySqYqwJ+QU/D7FXsYciS9P7NYBXE2ayKDAy3H0ou6CohOCaxPuTV4SZ0D936+VomHA==", "requires": { - "@hapi/b64": "4.x.x", - "@hapi/boom": "7.x.x", - "@hapi/content": "^4.1.1", - "@hapi/hoek": "8.x.x", - "@hapi/nigel": "3.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/b64": "5.x.x", + "@hapi/boom": "9.x.x", + "@hapi/content": "^5.0.2", + "@hapi/hoek": "9.x.x", + "@hapi/nigel": "4.x.x" } }, "@hapi/pinpoint": { @@ -923,115 +775,72 @@ "integrity": "sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw==" }, "@hapi/podium": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-3.4.3.tgz", - "integrity": "sha512-QJlnYLEYZWlKQ9fSOtuUcpANyoVGwT68GA9P0iQQCAetBK0fI+nbRBt58+aMixoifczWZUthuGkNjqKxgPh/CQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.1.tgz", + "integrity": "sha512-jh7a6+5Z4FUWzx8fgmxjaAa1DTBu+Qfg+NbVdo0f++rE5DgsVidUYrLDp3db65+QjDLleA2MfKQXkpT8ylBDXA==", "requires": { - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x" + "@hapi/hoek": "9.x.x", + "@hapi/teamwork": "5.x.x", + "@hapi/validate": "1.x.x" }, "dependencies": { - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" + "@hapi/teamwork": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.0.tgz", + "integrity": "sha512-llqoQTrAJDTXxG3c4Kz/uzhBS1TsmSBa/XG5SPcVXgmffHE1nFtyLIK0hNJHCB3EuBKT84adzd1hZNY9GJLWtg==" } } }, "@hapi/shot": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-4.1.2.tgz", - "integrity": "sha512-6LeHLjvsq/bQ0R+fhEyr7mqExRGguNTrxFZf5DyKe3CK6pNabiGgYO4JVFaRrLZ3JyuhkS0fo8iiRE2Ql2oA/A==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.4.tgz", + "integrity": "sha512-PcEz0WJgFDA3xNSMeONgQmothFr7jhbbRRSAKaDh7chN7zOXBlhl13bvKZW6CMb2xVfJUmt34CW3e/oExMgBhQ==", "requires": { - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/hoek": "9.x.x", + "@hapi/validate": "1.x.x" } }, "@hapi/somever": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-2.1.1.tgz", - "integrity": "sha512-cic5Sto4KGd9B0oQSdKTokju+rYhCbdpzbMb0EBnrH5Oc1z048hY8PaZ1lx2vBD7I/XIfTQVQetBH57fU51XRA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-3.0.0.tgz", + "integrity": "sha512-Upw/kmKotC9iEmK4y047HMYe4LDKsE5NWfjgX41XNKmFvxsQL7OiaCWVhuyyhU0ShDGBfIAnCH8jZr49z/JzZA==", "requires": { - "@hapi/bounce": "1.x.x", - "@hapi/hoek": "8.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/bounce": "2.x.x", + "@hapi/hoek": "9.x.x" } }, "@hapi/statehood": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-6.1.2.tgz", - "integrity": "sha512-pYXw1x6npz/UfmtcpUhuMvdK5kuOGTKcJNfLqdNptzietK2UZH5RzNJSlv5bDHeSmordFM3kGItcuQWX2lj2nQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.3.tgz", + "integrity": "sha512-pYB+pyCHkf2Amh67QAXz7e/DN9jcMplIL7Z6N8h0K+ZTy0b404JKPEYkbWHSnDtxLjJB/OtgElxocr2fMH4G7w==", "requires": { - "@hapi/boom": "7.x.x", - "@hapi/bounce": "1.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/cryptiles": "4.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/iron": "5.x.x", - "@hapi/joi": "16.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x", + "@hapi/bounce": "2.x.x", + "@hapi/bourne": "2.x.x", + "@hapi/cryptiles": "5.x.x", + "@hapi/hoek": "9.x.x", + "@hapi/iron": "6.x.x", + "@hapi/validate": "1.x.x" } }, "@hapi/subtext": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-6.1.3.tgz", - "integrity": "sha512-qWN6NbiHNzohVcJMeAlpku/vzbyH4zIpnnMPMPioQMwIxbPFKeNViDCNI6fVBbMPBiw/xB4FjqiJkRG5P9eWWg==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-7.0.3.tgz", + "integrity": "sha512-CekDizZkDGERJ01C0+TzHlKtqdXZxzSWTOaH6THBrbOHnsr3GY+yiMZC+AfNCypfE17RaIakGIAbpL2Tk1z2+A==", "requires": { - "@hapi/boom": "7.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/content": "^4.1.1", - "@hapi/file": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/pez": "^4.1.2", - "@hapi/wreck": "15.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x", + "@hapi/bourne": "2.x.x", + "@hapi/content": "^5.0.2", + "@hapi/file": "2.x.x", + "@hapi/hoek": "9.x.x", + "@hapi/pez": "^5.0.1", + "@hapi/wreck": "17.x.x" } }, "@hapi/teamwork": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-3.3.1.tgz", - "integrity": "sha512-61tiqWCYvMKP7fCTXy0M4VE6uNIwA0qvgFoiDubgfj7uqJ0fdHJFQNnVPGrxhLWlwz0uBPWrQlBH7r8y9vFITQ==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-4.0.0.tgz", + "integrity": "sha512-V6xYOrr5aFv/IJqNPneaYCu8vuGTKisamqHVRS3JJnbZr18TrpXdsJOYk9pjPhFti+M2YETPebQLUr820N5NoQ==" }, "@hapi/topo": { "version": "5.0.0", @@ -1051,69 +860,32 @@ } }, "@hapi/vise": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-3.1.1.tgz", - "integrity": "sha512-OXarbiCSadvtg+bSdVPqu31Z1JoBL+FwNYz3cYoBKQ5xq1/Cr4A3IkGpAZbAuxU5y4NL5pZFZG3d2a3ZGm/dOQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-4.0.0.tgz", + "integrity": "sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==", "requires": { - "@hapi/hoek": "8.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/hoek": "9.x.x" } }, "@hapi/vision": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/@hapi/vision/-/vision-5.5.4.tgz", - "integrity": "sha512-/DFgnQtcrlf2eQNkh/DHnjrCRHLSmHraU+PHe1SlxLUJxATQCw8VIEt6rJraM2jGTpFgHNk6B6ELtu3sBJCClg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@hapi/vision/-/vision-6.0.0.tgz", + "integrity": "sha512-NRG87SLS8evCTwAGlVHykmlk1i9z+7TD2pUwoDHRpjwqX/syt0ecrEKMLV/VdMijE9tCAtKIIXt+Myb16tT7Sw==", "requires": { - "@hapi/boom": "7.x.x", - "@hapi/bounce": "1.x.x", - "@hapi/hoek": "8.x.x", - "@hapi/joi": "16.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x", + "@hapi/bounce": "2.x.x", + "@hapi/hoek": "9.x.x", + "@hapi/joi": "17.x.x" } }, "@hapi/wreck": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-15.1.0.tgz", - "integrity": "sha512-tQczYRTTeYBmvhsek/D49En/5khcShaBEmzrAaDjMrFXKJRuF8xA8+tlq1ETLBFwGd6Do6g2OC74rt11kzawzg==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-17.1.0.tgz", + "integrity": "sha512-nx6sFyfqOpJ+EFrHX+XWwJAxs3ju4iHdbB/bwR8yTNZOiYmuhA8eCe7lYPtYmb4j7vyK/SlbaQsmTtUrMvPEBw==", "requires": { - "@hapi/boom": "7.x.x", - "@hapi/bourne": "1.x.x", - "@hapi/hoek": "8.x.x" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - } - }, - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } + "@hapi/boom": "9.x.x", + "@hapi/bourne": "2.x.x", + "@hapi/hoek": "9.x.x" } }, "@istanbuljs/load-nyc-config": { @@ -1135,40 +907,6 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -1183,345 +921,623 @@ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, - "@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" - }, - "@korzio/djv-draft-04": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@korzio/djv-draft-04/-/djv-draft-04-2.0.1.tgz", - "integrity": "sha512-MeTVcNsfCIYxK6T7jW1sroC7dBAb4IfLmQe6RoCqlxHN5NFkzNpgdnBPR+/0D2wJDUJHM9s9NQv+ouhxKjvUjg==", + "@jest/console": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz", + "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==", "dev": true, - "optional": true - }, - "@mojaloop/central-ledger": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/@mojaloop/central-ledger/-/central-ledger-9.2.2.tgz", - "integrity": "sha512-3sAAeDCmpaBcRDiCnlKUj6DkWbph5aXILM/WVMAl/LZGIe9EnpBgPf0/gT5j4TR0XUkgm1DYijCgZ72Cvfztsg==", "requires": { - "@hapi/good": "9.0.0", - "@hapi/hapi": "19.1.1", - "@hapi/inert": "6.0.1", - "@hapi/joi": "17.1.0", - "@hapi/vision": "6.0.0", - "@mojaloop/central-object-store": "9.1.0-snapshot", - "@mojaloop/central-services-database": "9.2.0", - "@mojaloop/central-services-error-handling": "9.1.0", - "@mojaloop/central-services-health": "9.2.0", - "@mojaloop/central-services-logger": "9.1.0", - "@mojaloop/central-services-metrics": "9.1.0", - "@mojaloop/central-services-shared": "9.2.0", - "@mojaloop/central-services-stream": "9.2.0", - "@mojaloop/event-sdk": "9.2.0", - "@mojaloop/forensic-logging-client": "8.3.0", - "@mojaloop/ml-number": "8.2.0", - "@now-ims/hapi-now-auth": "2.0.1", - "awaitify-stream": "1.0.2", - "base64url": "3.0.1", - "blipp": "4.0.1", - "catbox-memory": "4.0.1", - "commander": "4.1.1", - "cron": "1.8.2", - "decimal.js": "10.2.0", - "docdash": "1.2.0", - "five-bells-condition": "5.0.1", - "glob": "7.1.6", - "hapi-auth-basic": "5.0.0", - "hapi-auth-bearer-token": "6.2.1", - "hapi-swagger": "12.1.1", - "knex": "0.20.10", - "lodash": "4.17.15", - "moment": "2.24.0", - "mongoose": "5.9.2", - "mysql": "2.18.1", - "npm-run-all": "4.1.5", - "rc": "1.2.8", - "require-glob": "3.2.0", - "uuid4": "1.1.4" + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.2", + "jest-util": "^26.6.2", + "slash": "^3.0.0" }, "dependencies": { - "@hapi/accept": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.1.tgz", - "integrity": "sha512-fMr4d7zLzsAXo28PRRQPXR1o2Wmu+6z+VY1UzDp0iFo13Twj8WePakwXBiqn3E1aAlTpSNzCXdnnQXFhst8h8Q==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/ammo": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-5.0.1.tgz", - "integrity": "sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { - "@hapi/hoek": "9.x.x" + "color-convert": "^2.0.1" } }, - "@hapi/b64": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz", - "integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==", + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, "requires": { - "@hapi/hoek": "9.x.x" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "@hapi/bounce": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-2.0.0.tgz", - "integrity": "sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "color-name": "~1.1.4" } }, - "@hapi/bourne": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.0.0.tgz", - "integrity": "sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==" + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "@jest/core": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", + "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/reporters": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-changed-files": "^26.6.2", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-resolve-dependencies": "^26.6.3", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "jest-watcher": "^26.6.2", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true }, - "@hapi/call": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.1.tgz", - "integrity": "sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" + "color-convert": "^2.0.1" } }, - "@hapi/catbox": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.0.tgz", - "integrity": "sha512-FDEjfn26RZRyOEPeZdaAL7dRiAK5FOGuwTnTw0gxK30csAlKeOHsEnoIxnLIXx7QOS17eUaOk6+MiweWQM6Keg==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", - "@hapi/podium": "4.x.x" + "fill-range": "^7.0.1" } }, - "@hapi/content": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@hapi/content/-/content-5.0.2.tgz", - "integrity": "sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==", + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, "requires": { - "@hapi/boom": "9.x.x" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "@hapi/cryptiles": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz", - "integrity": "sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { - "@hapi/boom": "9.x.x" + "color-name": "~1.1.4" } }, - "@hapi/file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/file/-/file-2.0.0.tgz", - "integrity": "sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ==" - }, - "@hapi/good": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@hapi/good/-/good-9.0.0.tgz", - "integrity": "sha512-jt6mEzFfY+jzE/IbvNVTTHcqKE9RP609MXKff1Pj4VPCnCSG8UVUtTdr1nM6UFN02NvntqShlpeZi4o+RgN35g==", - "requires": { - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", - "@hapi/oppsy": "3.x.x", - "pumpify": "1.x.x" - } + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, - "@hapi/hapi": { - "version": "19.1.1", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-19.1.1.tgz", - "integrity": "sha512-rpQzSs0XsHSF7usM4qdJJ0Bcmhs9stWhUW3OiamW33bw4qL8q3uEgUKB9KH8ODmluCAkkXOQ0X0Dh9t94E5VIw==", + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, "requires": { - "@hapi/accept": "^5.0.1", - "@hapi/ammo": "^5.0.1", - "@hapi/boom": "9.x.x", - "@hapi/bounce": "2.x.x", - "@hapi/call": "8.x.x", - "@hapi/catbox": "11.x.x", - "@hapi/catbox-memory": "5.x.x", - "@hapi/heavy": "7.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", - "@hapi/mimos": "5.x.x", - "@hapi/podium": "4.x.x", - "@hapi/shot": "5.x.x", - "@hapi/somever": "3.x.x", - "@hapi/statehood": "^7.0.2", - "@hapi/subtext": "^7.0.3", - "@hapi/teamwork": "4.x.x", - "@hapi/topo": "5.x.x" + "to-regex-range": "^5.0.1" } }, - "@hapi/heavy": { + "is-number": { "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.0.tgz", - "integrity": "sha512-n/nheUG6zNleWkjY+3fzV3VJIAumUCaa/WoTmurjqlYY5JgC5ZKOpvP7tWi8rXmKZhbcXgjH3fHFoM55LoBT7g==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x" - } - }, - "@hapi/inert": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@hapi/inert/-/inert-6.0.1.tgz", - "integrity": "sha512-oLxAmtWni3nH4INU2gcXFnHBw0GhHYF3HR71hAWrPc91dq+iFYGfawfaMbonwGr5DkzFiGe8Ir5sZAt2AqeINA==", - "requires": { - "@hapi/ammo": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/bounce": "2.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", - "lru-cache": "5.x.x" - } + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, - "@hapi/iron": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-6.0.0.tgz", - "integrity": "sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==", + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, "requires": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x" + "braces": "^3.0.1", + "picomatch": "^2.0.5" } }, - "@hapi/joi": { - "version": "17.1.0", - "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-17.1.0.tgz", - "integrity": "sha512-ob67RcPlwRWxBzLCnWvcwx5qbwf88I3ykD7gcJLWOTRfLLgosK7r6aeChz4thA3XRvuBfI0KB1tPVl2EQFlPXw==", + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "requires": { - "@hapi/address": "^4.0.0", - "@hapi/formula": "^2.0.0", - "@hapi/hoek": "^9.0.0", - "@hapi/pinpoint": "^2.0.0", - "@hapi/topo": "^5.0.0" + "glob": "^7.1.3" } }, - "@hapi/mimos": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-5.0.0.tgz", - "integrity": "sha512-EVS6wJYeE73InTlPWt+2e3Izn319iIvffDreci3qDNT+t3lA5ylJ0/SoTaID8e0TPNUkHUSsgJZXEmLHvoYzrA==", + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, "requires": { - "@hapi/hoek": "9.x.x", - "mime-db": "1.x.x" + "ansi-regex": "^5.0.0" } }, - "@hapi/nigel": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.2.tgz", - "integrity": "sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==", + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "requires": { - "@hapi/hoek": "^9.0.4", - "@hapi/vise": "^4.0.0" + "is-number": "^7.0.0" } - }, - "@hapi/pez": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.0.3.tgz", - "integrity": "sha512-mpikYRJjtrbJgdDHG/H9ySqYqwJ+QU/D7FXsYciS9P7NYBXE2ayKDAy3H0ou6CohOCaxPuTV4SZ0D936+VomHA==", + } + } + }, + "@jest/environment": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", + "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", + "dev": true, + "requires": { + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2" + } + }, + "@jest/fake-timers": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", + "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@sinonjs/fake-timers": "^6.0.1", + "@types/node": "*", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" + } + }, + "@jest/globals": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz", + "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/types": "^26.6.2", + "expect": "^26.6.2" + } + }, + "@jest/reporters": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz", + "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.4", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "jest-haste-map": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "node-notifier": "^8.0.0", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^7.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/content": "^5.0.2", - "@hapi/hoek": "9.x.x", - "@hapi/nigel": "4.x.x" + "color-convert": "^2.0.1" } }, - "@hapi/podium": { + "chalk": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.0.tgz", - "integrity": "sha512-k/n0McAu8PvonfQRLyKKUvvdb+Gh/O5iAeIwv535Hpxw9B1qZcrYdZyWtHZ8O5PkA9/b/Kk+BdvtgcxeKMB/2g==", - "requires": { - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", - "@hapi/teamwork": "4.x.x" - } - }, - "@hapi/shot": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.0.tgz", - "integrity": "sha512-JXddnJkRh3Xhv9lY1tA+TSIUaoODKbdNIPL/M8WFvFQKOttmGaDeqTW5e8Gf01LtLI7L5DraLMULHjrK1+YNFg==", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, "requires": { - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "@hapi/somever": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-3.0.0.tgz", - "integrity": "sha512-Upw/kmKotC9iEmK4y047HMYe4LDKsE5NWfjgX41XNKmFvxsQL7OiaCWVhuyyhU0ShDGBfIAnCH8jZr49z/JzZA==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { - "@hapi/bounce": "2.x.x", - "@hapi/hoek": "9.x.x" + "color-name": "~1.1.4" } }, - "@hapi/statehood": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.2.tgz", - "integrity": "sha512-+0VNxysQu+UYzkfvAXq3X4aN65TnUwiR7gsq2cQ/4Rq26nCJjHAfrkYReEeshU2hPmJ3m5QuaBzyDqRm8WOpyg==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/bounce": "2.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/iron": "6.x.x", - "@hapi/joi": "17.x.x" - } + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, - "@hapi/subtext": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-7.0.3.tgz", - "integrity": "sha512-CekDizZkDGERJ01C0+TzHlKtqdXZxzSWTOaH6THBrbOHnsr3GY+yiMZC+AfNCypfE17RaIakGIAbpL2Tk1z2+A==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/content": "^5.0.2", - "@hapi/file": "2.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/pez": "^5.0.1", - "@hapi/wreck": "17.x.x" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@jest/source-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", + "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.4", + "source-map": "^0.6.0" + }, + "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true }, - "@hapi/teamwork": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-4.0.0.tgz", - "integrity": "sha512-V6xYOrr5aFv/IJqNPneaYCu8vuGTKisamqHVRS3JJnbZr18TrpXdsJOYk9pjPhFti+M2YETPebQLUr820N5NoQ==" + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@jest/test-result": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz", + "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz", + "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==", + "dev": true, + "requires": { + "@jest/test-result": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3" + } + }, + "@jest/transform": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz", + "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^26.6.2", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.6.2", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } }, - "@hapi/vise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-4.0.0.tgz", - "integrity": "sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, "requires": { - "@hapi/hoek": "9.x.x" + "fill-range": "^7.0.1" } }, - "@hapi/vision": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@hapi/vision/-/vision-6.0.0.tgz", - "integrity": "sha512-NRG87SLS8evCTwAGlVHykmlk1i9z+7TD2pUwoDHRpjwqX/syt0ecrEKMLV/VdMijE9tCAtKIIXt+Myb16tT7Sw==", + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "@jsdevtools/ono": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", + "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==" + }, + "@korzio/djv-draft-04": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@korzio/djv-draft-04/-/djv-draft-04-2.0.1.tgz", + "integrity": "sha512-MeTVcNsfCIYxK6T7jW1sroC7dBAb4IfLmQe6RoCqlxHN5NFkzNpgdnBPR+/0D2wJDUJHM9s9NQv+ouhxKjvUjg==", + "dev": true, + "optional": true + }, + "@mojaloop/central-ledger": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@mojaloop/central-ledger/-/central-ledger-9.2.2.tgz", + "integrity": "sha512-3sAAeDCmpaBcRDiCnlKUj6DkWbph5aXILM/WVMAl/LZGIe9EnpBgPf0/gT5j4TR0XUkgm1DYijCgZ72Cvfztsg==", + "requires": { + "@hapi/good": "9.0.0", + "@hapi/hapi": "19.1.1", + "@hapi/inert": "6.0.1", + "@hapi/joi": "17.1.0", + "@hapi/vision": "6.0.0", + "@mojaloop/central-object-store": "9.1.0-snapshot", + "@mojaloop/central-services-database": "9.2.0", + "@mojaloop/central-services-error-handling": "9.1.0", + "@mojaloop/central-services-health": "9.2.0", + "@mojaloop/central-services-logger": "9.1.0", + "@mojaloop/central-services-metrics": "9.1.0", + "@mojaloop/central-services-shared": "9.2.0", + "@mojaloop/central-services-stream": "9.2.0", + "@mojaloop/event-sdk": "9.2.0", + "@mojaloop/forensic-logging-client": "8.3.0", + "@mojaloop/ml-number": "8.2.0", + "@now-ims/hapi-now-auth": "2.0.1", + "awaitify-stream": "1.0.2", + "base64url": "3.0.1", + "blipp": "4.0.1", + "catbox-memory": "4.0.1", + "commander": "4.1.1", + "cron": "1.8.2", + "decimal.js": "10.2.0", + "docdash": "1.2.0", + "five-bells-condition": "5.0.1", + "glob": "7.1.6", + "hapi-auth-basic": "5.0.0", + "hapi-auth-bearer-token": "6.2.1", + "hapi-swagger": "12.1.1", + "knex": "0.20.10", + "lodash": "4.17.15", + "moment": "2.24.0", + "mongoose": "5.9.2", + "mysql": "2.18.1", + "npm-run-all": "4.1.5", + "rc": "1.2.8", + "require-glob": "3.2.0", + "uuid4": "1.1.4" + }, + "dependencies": { + "@hapi/bourne": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", + "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==" + }, + "@hapi/good": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@hapi/good/-/good-9.0.0.tgz", + "integrity": "sha512-jt6mEzFfY+jzE/IbvNVTTHcqKE9RP609MXKff1Pj4VPCnCSG8UVUtTdr1nM6UFN02NvntqShlpeZi4o+RgN35g==", + "requires": { + "@hapi/hoek": "9.x.x", + "@hapi/joi": "17.x.x", + "@hapi/oppsy": "3.x.x", + "pumpify": "1.x.x" + } + }, + "@hapi/hapi": { + "version": "19.1.1", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-19.1.1.tgz", + "integrity": "sha512-rpQzSs0XsHSF7usM4qdJJ0Bcmhs9stWhUW3OiamW33bw4qL8q3uEgUKB9KH8ODmluCAkkXOQ0X0Dh9t94E5VIw==", "requires": { + "@hapi/accept": "^5.0.1", + "@hapi/ammo": "^5.0.1", "@hapi/boom": "9.x.x", "@hapi/bounce": "2.x.x", + "@hapi/call": "8.x.x", + "@hapi/catbox": "11.x.x", + "@hapi/catbox-memory": "5.x.x", + "@hapi/heavy": "7.x.x", "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x" + "@hapi/joi": "17.x.x", + "@hapi/mimos": "5.x.x", + "@hapi/podium": "4.x.x", + "@hapi/shot": "5.x.x", + "@hapi/somever": "3.x.x", + "@hapi/statehood": "^7.0.2", + "@hapi/subtext": "^7.0.3", + "@hapi/teamwork": "4.x.x", + "@hapi/topo": "5.x.x" } }, - "@hapi/wreck": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-17.0.0.tgz", - "integrity": "sha512-d8lqCinbKyDByn7GzJDRDbitddhIEydNm44UcAMejfhEH3o4IYvKYq6K8cAqXbilXPuvZc0ErlUOg9SDdgRtMw==", + "@hapi/joi": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-17.1.0.tgz", + "integrity": "sha512-ob67RcPlwRWxBzLCnWvcwx5qbwf88I3ykD7gcJLWOTRfLLgosK7r6aeChz4thA3XRvuBfI0KB1tPVl2EQFlPXw==", "requires": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/hoek": "9.x.x" + "@hapi/address": "^4.0.0", + "@hapi/formula": "^2.0.0", + "@hapi/hoek": "^9.0.0", + "@hapi/pinpoint": "^2.0.0", + "@hapi/topo": "^5.0.0" } }, "@mojaloop/central-services-database": { @@ -1723,6 +1739,19 @@ } } }, + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "requires": { + "follow-redirects": "1.5.10" + } + }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + }, "blipp": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/blipp/-/blipp-4.0.1.tgz", @@ -1739,11 +1768,6 @@ "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz", "integrity": "sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==" }, - "@hapi/bourne": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", - "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==" - }, "@hapi/hoek": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", @@ -1811,11 +1835,6 @@ } } }, - "@hapi/bourne": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz", - "integrity": "sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==" - }, "@hapi/hoek": { "version": "6.2.4", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-6.2.4.tgz", @@ -1893,14 +1912,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - } - }, "mustache": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.0.tgz", @@ -1925,6 +1936,25 @@ "pump": "^2.0.0" } }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "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" + } + }, + "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==" + }, "sinon": { "version": "8.0.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.0.4.tgz", @@ -1939,15 +1969,18 @@ "supports-color": "^7.1.0" } }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "uuid4": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/uuid4/-/uuid4-1.1.4.tgz", "integrity": "sha512-Gr1q2k40LpF8CokcnQFjPDsdslzJbTCTBG5xQIEflUov431gFkY5KduiGIeKYAamkQnNn4IfdHJbLnl9Bib8TQ==" - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } } }, @@ -1987,6 +2020,16 @@ "sift": "7.0.1", "sliced": "1.0.1" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "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==" } } }, @@ -2050,18 +2093,18 @@ } }, "@mojaloop/central-services-error-handling": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-error-handling/-/central-services-error-handling-10.6.0.tgz", - "integrity": "sha512-93Jbz/CWNxMiA6/x+KmQezf7C/K3etIAwmXdeAjR9BBDM9xJt1nGfRDovXJZzqV5pTgh9ytGen7A3ub6oVqcQA==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-error-handling/-/central-services-error-handling-11.0.0.tgz", + "integrity": "sha512-kK7d09NM9uhpwXSzeAuyVWetVkrK5UICC/jdByYry1QQ2JosaKbu12N08qRTjfbpkHU7DG5l+EV2vmdMPeQ3ZQ==", "requires": { - "@mojaloop/sdk-standard-components": "10.3.2", - "lodash": "4.17.19" + "@mojaloop/sdk-standard-components": "13.1.2", + "lodash": "4.17.20" }, "dependencies": { "@mojaloop/sdk-standard-components": { - "version": "10.3.2", - "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-10.3.2.tgz", - "integrity": "sha512-O5DqUL+ncS718nFDFUMx8QO0pmTmg+/CNYuaXPrFfHDgf8c05mgSjg6Z8wt69Auwph6WXWaNjKTQRqZG2/BDdQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-13.1.2.tgz", + "integrity": "sha512-eo8DWLUYkeXoj+Qd97qEm2fQEVzodJTB0eBUjWUS7pcNWEzLW7HXh0Kouozyfs0Ba5SUngYXNjWDTce0Qp95uQ==", "requires": { "base64url": "3.0.1", "fast-safe-stringify": "^2.0.7", @@ -2088,368 +2131,209 @@ "jwa": "^2.0.0", "safe-buffer": "^5.0.1" } - }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" } } }, "@mojaloop/central-services-health": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-health/-/central-services-health-10.6.0.tgz", - "integrity": "sha512-ypO55rFBEW98v38rcJPvPJ5d2jPU45MoMjgOYnVVAptLK8YcUwomtMZGwfnXggPFyo2m/+p/rV8I9zhKap04rg==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-health/-/central-services-health-11.0.0.tgz", + "integrity": "sha512-w/2AZDuhcrC75MH4gH6F7Z0kh2TrwlYYX4A1B09peObRizbq9WXH9yMs1HnTFThl8x/8Ww0qCMU/dXWn9WcIzA==", "requires": { - "@hapi/hapi": "19.1.1", - "@mojaloop/central-services-error-handling": "10.6.0", + "@hapi/hapi": "20.0.3", + "@mojaloop/central-services-error-handling": "11.0.0", "@mojaloop/central-services-logger": "10.6.0", - "@mojaloop/central-services-shared": "10.6.1", - "tslib": "2.0.0" + "@mojaloop/central-services-shared": "11.5.4", + "tslib": "2.1.0" }, "dependencies": { - "@grpc/proto-loader": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", - "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", - "requires": { - "lodash.camelcase": "^4.3.0", - "protobufjs": "^6.8.6" - } - }, - "@hapi/accept": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.1.tgz", - "integrity": "sha512-fMr4d7zLzsAXo28PRRQPXR1o2Wmu+6z+VY1UzDp0iFo13Twj8WePakwXBiqn3E1aAlTpSNzCXdnnQXFhst8h8Q==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/ammo": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-5.0.1.tgz", - "integrity": "sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==", - "requires": { - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/b64": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz", - "integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==", - "requires": { - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/bounce": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-2.0.0.tgz", - "integrity": "sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/bourne": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.0.0.tgz", - "integrity": "sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==" - }, - "@hapi/call": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.1.tgz", - "integrity": "sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/catbox": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.0.tgz", - "integrity": "sha512-FDEjfn26RZRyOEPeZdaAL7dRiAK5FOGuwTnTw0gxK30csAlKeOHsEnoIxnLIXx7QOS17eUaOk6+MiweWQM6Keg==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", - "@hapi/podium": "4.x.x" - } - }, - "@hapi/content": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@hapi/content/-/content-5.0.2.tgz", - "integrity": "sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==", - "requires": { - "@hapi/boom": "9.x.x" - } - }, - "@hapi/cryptiles": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz", - "integrity": "sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==", - "requires": { - "@hapi/boom": "9.x.x" - } - }, - "@hapi/file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/file/-/file-2.0.0.tgz", - "integrity": "sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ==" - }, "@hapi/hapi": { - "version": "19.1.1", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-19.1.1.tgz", - "integrity": "sha512-rpQzSs0XsHSF7usM4qdJJ0Bcmhs9stWhUW3OiamW33bw4qL8q3uEgUKB9KH8ODmluCAkkXOQ0X0Dh9t94E5VIw==", + "version": "20.0.3", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-20.0.3.tgz", + "integrity": "sha512-aqJVHVjoY3phiZsgsGjDRG15CoUNIs1azScqLZDOCZUSKYGTbzPi+K0QP+RUjUJ0m8L9dRuTZ27c8HKxG3wEhA==", "requires": { "@hapi/accept": "^5.0.1", "@hapi/ammo": "^5.0.1", "@hapi/boom": "9.x.x", "@hapi/bounce": "2.x.x", "@hapi/call": "8.x.x", - "@hapi/catbox": "11.x.x", + "@hapi/catbox": "^11.1.1", "@hapi/catbox-memory": "5.x.x", - "@hapi/heavy": "7.x.x", + "@hapi/heavy": "^7.0.1", "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", "@hapi/mimos": "5.x.x", - "@hapi/podium": "4.x.x", - "@hapi/shot": "5.x.x", + "@hapi/podium": "^4.1.1", + "@hapi/shot": "^5.0.1", "@hapi/somever": "3.x.x", - "@hapi/statehood": "^7.0.2", + "@hapi/statehood": "^7.0.3", "@hapi/subtext": "^7.0.3", - "@hapi/teamwork": "4.x.x", - "@hapi/topo": "5.x.x" + "@hapi/teamwork": "5.x.x", + "@hapi/topo": "5.x.x", + "@hapi/validate": "^1.1.0" } }, - "@hapi/heavy": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.0.tgz", - "integrity": "sha512-n/nheUG6zNleWkjY+3fzV3VJIAumUCaa/WoTmurjqlYY5JgC5ZKOpvP7tWi8rXmKZhbcXgjH3fHFoM55LoBT7g==", + "@hapi/teamwork": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.0.tgz", + "integrity": "sha512-llqoQTrAJDTXxG3c4Kz/uzhBS1TsmSBa/XG5SPcVXgmffHE1nFtyLIK0hNJHCB3EuBKT84adzd1hZNY9GJLWtg==" + }, + "tslib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" + } + } + }, + "@mojaloop/central-services-logger": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-logger/-/central-services-logger-10.6.0.tgz", + "integrity": "sha512-fvZVCtquX+QR+kuKhx/jiyf+B5E7zXYi1HfgaLWR/5+wqdopMltxRGYyRZJyJ1uqdstm+/HOSFvWjqv3JXZ1hw==", + "requires": { + "parse-strings-in-object": "2.0.0", + "rc": "1.2.8", + "winston": "3.3.3" + }, + "dependencies": { + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + }, + "one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x" + "fn.name": "1.x.x" } }, - "@hapi/iron": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-6.0.0.tgz", - "integrity": "sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==", + "winston": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", "requires": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x" + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.4.0" } - }, - "@hapi/joi": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-17.1.1.tgz", - "integrity": "sha512-p4DKeZAoeZW4g3u7ZeRo+vCDuSDgSvtsB/NpfjXEHTUjSeINAi/RrVOWiVQ1isaoLzMvFEhe8n5065mQq1AdQg==", + } + } + }, + "@mojaloop/central-services-metrics": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-metrics/-/central-services-metrics-9.1.0.tgz", + "integrity": "sha512-pE+zgVduOORYipJsUTa3ugm930Uzm8dnLxIkJEpBFoZWPqknDMTSZFvy2PU3g/hft2+IIuLSlOzHC7YxNdWBRA==", + "requires": { + "prom-client": "11.5.3" + } + }, + "@mojaloop/central-services-shared": { + "version": "11.5.4", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-11.5.4.tgz", + "integrity": "sha512-A2PY8U+sQtfJtg84nPLrnGXIDhFCUaTDbTpuv2rtTWFyXNv0s9PB2YtA09aLKtZ3nf5JKs+D6L8qwgP2T1v+Nw==", + "requires": { + "@hapi/catbox": "11.1.1", + "@hapi/catbox-memory": "5.0.0", + "@mojaloop/central-services-error-handling": "11.0.0", + "@mojaloop/central-services-logger": "10.6.0", + "@mojaloop/central-services-metrics": "9.5.0", + "@mojaloop/event-sdk": "10.6.0", + "ajv": "6.12.6", + "ajv-keywords": "3.5.2", + "axios": "0.21.1", + "base64url": "3.0.1", + "clone": "2.1.2", + "data-urls": "2.0.0", + "dotenv": "8.2.0", + "env-var": "7.0.0", + "event-stream": "4.0.1", + "immutable": "3.8.2", + "lodash": "4.17.20", + "mustache": "4.1.0", + "openapi-backend": "3.6.3", + "raw-body": "2.4.1", + "rc": "1.2.8", + "shins": "2.6.0", + "uuid4": "2.0.2", + "widdershins": "4.0.1", + "yaml": "1.10.0" + }, + "dependencies": { + "@grpc/proto-loader": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", + "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", "requires": { - "@hapi/address": "^4.0.1", - "@hapi/formula": "^2.0.0", - "@hapi/hoek": "^9.0.0", - "@hapi/pinpoint": "^2.0.0", - "@hapi/topo": "^5.0.0" + "lodash.camelcase": "^4.3.0", + "protobufjs": "^6.8.6" } }, - "@hapi/mimos": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-5.0.0.tgz", - "integrity": "sha512-EVS6wJYeE73InTlPWt+2e3Izn319iIvffDreci3qDNT+t3lA5ylJ0/SoTaID8e0TPNUkHUSsgJZXEmLHvoYzrA==", + "@mojaloop/central-services-metrics": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-metrics/-/central-services-metrics-9.5.0.tgz", + "integrity": "sha512-4wba5JCNhmevBEHAPl+BmMqTmfT/7lOxbuRlziyAFhcySrZpCQhINMwyGm1CmNlldsDtp8rHaL5inQzKAGsBXA==", "requires": { - "@hapi/hoek": "9.x.x", - "mime-db": "1.x.x" + "prom-client": "11.5.3" } }, - "@hapi/nigel": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.2.tgz", - "integrity": "sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==", + "@mojaloop/event-sdk": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-10.6.0.tgz", + "integrity": "sha512-mDVow/3WDILDUF2v32fqcOZAoRQCOZX8D2fJF3kHvZLGthU9ydNPHK118aVibw76XAyq6E6UbxHMXg3ZUPBlhg==", "requires": { - "@hapi/hoek": "^9.0.4", - "@hapi/vise": "^4.0.0" + "@grpc/proto-loader": "0.5.4", + "@mojaloop/central-services-logger": "10.6.0", + "brototype": "0.0.6", + "error-callsites": "2.0.3", + "grpc": "1.24.3", + "lodash": "4.17.19", + "moment": "2.27.0", + "parse-strings-in-object": "2.0.0", + "protobufjs": "6.9.0", + "rc": "1.2.8", + "serialize-error": "4.1.0", + "sinon": "9.0.2", + "traceparent": "1.0.0", + "tslib": "2.0.0", + "uuid4": "2.0.2", + "winston": "3.3.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + } } }, - "@hapi/pez": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.0.3.tgz", - "integrity": "sha512-mpikYRJjtrbJgdDHG/H9ySqYqwJ+QU/D7FXsYciS9P7NYBXE2ayKDAy3H0ou6CohOCaxPuTV4SZ0D936+VomHA==", + "@sinonjs/formatio": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", + "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", "requires": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/content": "^5.0.2", - "@hapi/hoek": "9.x.x", - "@hapi/nigel": "4.x.x" + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^5.0.2" } }, - "@hapi/podium": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.0.tgz", - "integrity": "sha512-k/n0McAu8PvonfQRLyKKUvvdb+Gh/O5iAeIwv535Hpxw9B1qZcrYdZyWtHZ8O5PkA9/b/Kk+BdvtgcxeKMB/2g==", + "@sinonjs/samsam": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", "requires": { - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x", - "@hapi/teamwork": "4.x.x" - } - }, - "@hapi/shot": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.0.tgz", - "integrity": "sha512-JXddnJkRh3Xhv9lY1tA+TSIUaoODKbdNIPL/M8WFvFQKOttmGaDeqTW5e8Gf01LtLI7L5DraLMULHjrK1+YNFg==", - "requires": { - "@hapi/hoek": "9.x.x", - "@hapi/joi": "17.x.x" - } - }, - "@hapi/somever": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-3.0.0.tgz", - "integrity": "sha512-Upw/kmKotC9iEmK4y047HMYe4LDKsE5NWfjgX41XNKmFvxsQL7OiaCWVhuyyhU0ShDGBfIAnCH8jZr49z/JzZA==", - "requires": { - "@hapi/bounce": "2.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/statehood": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.2.tgz", - "integrity": "sha512-+0VNxysQu+UYzkfvAXq3X4aN65TnUwiR7gsq2cQ/4Rq26nCJjHAfrkYReEeshU2hPmJ3m5QuaBzyDqRm8WOpyg==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/bounce": "2.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/iron": "6.x.x", - "@hapi/joi": "17.x.x" - } - }, - "@hapi/subtext": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-7.0.3.tgz", - "integrity": "sha512-CekDizZkDGERJ01C0+TzHlKtqdXZxzSWTOaH6THBrbOHnsr3GY+yiMZC+AfNCypfE17RaIakGIAbpL2Tk1z2+A==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/content": "^5.0.2", - "@hapi/file": "2.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/pez": "^5.0.1", - "@hapi/wreck": "17.x.x" - } - }, - "@hapi/teamwork": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-4.0.0.tgz", - "integrity": "sha512-V6xYOrr5aFv/IJqNPneaYCu8vuGTKisamqHVRS3JJnbZr18TrpXdsJOYk9pjPhFti+M2YETPebQLUr820N5NoQ==" - }, - "@hapi/vise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-4.0.0.tgz", - "integrity": "sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==", - "requires": { - "@hapi/hoek": "9.x.x" - } - }, - "@hapi/wreck": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-17.0.0.tgz", - "integrity": "sha512-d8lqCinbKyDByn7GzJDRDbitddhIEydNm44UcAMejfhEH3o4IYvKYq6K8cAqXbilXPuvZc0ErlUOg9SDdgRtMw==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "@mojaloop/central-services-metrics": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-metrics/-/central-services-metrics-9.5.0.tgz", - "integrity": "sha512-4wba5JCNhmevBEHAPl+BmMqTmfT/7lOxbuRlziyAFhcySrZpCQhINMwyGm1CmNlldsDtp8rHaL5inQzKAGsBXA==", - "requires": { - "prom-client": "11.5.3" - } - }, - "@mojaloop/central-services-shared": { - "version": "10.6.1", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-10.6.1.tgz", - "integrity": "sha512-xUGiZgrpRW9uWshHHmHm3ecvJtJrJNv8BlYcbV9vo+1M5a5336WLd97Zwe/2/o9DwYyCFuNMjz/7JS6tfYEoUw==", - "requires": { - "@hapi/catbox": "11.1.0", - "@hapi/catbox-memory": "5.0.0", - "@mojaloop/central-services-error-handling": "10.6.0", - "@mojaloop/central-services-logger": "10.6.0", - "@mojaloop/central-services-metrics": "9.5.0", - "@mojaloop/event-sdk": "10.6.0", - "ajv": "6.12.3", - "ajv-keywords": "3.5.1", - "axios": "0.19.2", - "base64url": "3.0.1", - "clone": "2.1.2", - "data-urls": "2.0.0", - "immutable": "3.8.2", - "lodash": "4.17.19", - "mustache": "4.0.1", - "openapi-backend": "3.5.1", - "raw-body": "2.4.1" - }, - "dependencies": { - "mustache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.1.tgz", - "integrity": "sha512-yL5VE97+OXn4+Er3THSmTdCFCtx5hHWzrolvH+JObZnUYwuaG7XV+Ch4fR2cIrcYI0tFHxS7iyFYl14bW8y2sA==" - } - } - }, - "@mojaloop/event-sdk": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-10.6.0.tgz", - "integrity": "sha512-mDVow/3WDILDUF2v32fqcOZAoRQCOZX8D2fJF3kHvZLGthU9ydNPHK118aVibw76XAyq6E6UbxHMXg3ZUPBlhg==", - "requires": { - "@grpc/proto-loader": "0.5.4", - "@mojaloop/central-services-logger": "10.6.0", - "brototype": "0.0.6", - "error-callsites": "2.0.3", - "grpc": "1.24.3", - "lodash": "4.17.19", - "moment": "2.27.0", - "parse-strings-in-object": "2.0.0", - "protobufjs": "6.9.0", - "rc": "1.2.8", - "serialize-error": "4.1.0", - "sinon": "9.0.2", - "traceparent": "1.0.0", - "tslib": "2.0.0", - "uuid4": "2.0.2", - "winston": "3.3.3" - } - }, - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, - "@sinonjs/samsam": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.0.tgz", - "integrity": "sha512-hXpcfx3aq+ETVBwPlRFICld5EnrkexXuXDwqUNhDdr5L8VjvMeSRwyOa0qL7XFmR+jVWR4rUZtnxlG7RX72sBg==", - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" } }, "@types/node": { - "version": "13.13.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.15.tgz", - "integrity": "sha512-kwbcs0jySLxzLsa2nWUAGOd/s21WU1jebrEdtzhsj1D4Yps1EOuyI1Qcu+FD56dL7NRNIJtDDjcqIG22NwkgLw==" + "version": "13.13.39", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.39.tgz", + "integrity": "sha512-wct+WgRTTkBm2R3vbrFOqyZM5w0g+D8KnhstG9463CJBVC3UVZHMToge7iMBR1vDl/I+NWFHUeK9X+JcF0rWKw==" }, "error-callsites": { "version": "2.0.3", @@ -2487,11 +2371,6 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - }, "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -2542,16 +2421,6 @@ "long": "^4.0.0" } }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, "sinon": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", @@ -2589,697 +2458,342 @@ } } }, - "@mojaloop/central-services-logger": { + "@mojaloop/central-services-stream": { "version": "10.6.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-logger/-/central-services-logger-10.6.0.tgz", - "integrity": "sha512-fvZVCtquX+QR+kuKhx/jiyf+B5E7zXYi1HfgaLWR/5+wqdopMltxRGYyRZJyJ1uqdstm+/HOSFvWjqv3JXZ1hw==", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-stream/-/central-services-stream-10.6.0.tgz", + "integrity": "sha512-1f+027JPvXL/xT4Z9YgTB+dbNCSi77qI9AqSFlBq/QYz1BpWWWmBAwKCoj/IKP+9LBPkkpSC6Xq+TcmCvCpzUw==", "requires": { - "parse-strings-in-object": "2.0.0", - "rc": "1.2.8", - "winston": "3.3.3" + "@mojaloop/central-services-error-handling": "10.6.0", + "@mojaloop/central-services-logger": "10.6.0", + "async": "3.2.0", + "events": "3.1.0", + "node-rdkafka": "2.9.0" }, "dependencies": { - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + "@mojaloop/central-services-error-handling": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-error-handling/-/central-services-error-handling-10.6.0.tgz", + "integrity": "sha512-93Jbz/CWNxMiA6/x+KmQezf7C/K3etIAwmXdeAjR9BBDM9xJt1nGfRDovXJZzqV5pTgh9ytGen7A3ub6oVqcQA==", + "requires": { + "@mojaloop/sdk-standard-components": "10.3.2", + "lodash": "4.17.19" + } }, - "one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "@mojaloop/sdk-standard-components": { + "version": "10.3.2", + "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-10.3.2.tgz", + "integrity": "sha512-O5DqUL+ncS718nFDFUMx8QO0pmTmg+/CNYuaXPrFfHDgf8c05mgSjg6Z8wt69Auwph6WXWaNjKTQRqZG2/BDdQ==", "requires": { - "fn.name": "1.x.x" + "base64url": "3.0.1", + "fast-safe-stringify": "^2.0.7", + "ilp-packet": "2.2.0", + "jsonwebtoken": "8.5.1", + "jws": "4.0.0" } }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" } }, - "winston": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", - "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", "requires": { - "@dabh/diagnostics": "^2.0.2", - "async": "^3.1.0", - "is-stream": "^2.0.0", - "logform": "^2.2.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + }, + "node-rdkafka": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/node-rdkafka/-/node-rdkafka-2.9.0.tgz", + "integrity": "sha512-lVBb3J/KVMDXUSdC0avoNZ/9Yab9XiDMTFPKdMkXc4AjaIafVPGLNa5yVV7hly9pBfZ5yIHF71sAI4SH/E5G4Q==", + "requires": { + "bindings": "^1.3.1", + "nan": "^2.14.0" } } } }, - "@mojaloop/central-services-metrics": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-metrics/-/central-services-metrics-9.1.0.tgz", - "integrity": "sha512-pE+zgVduOORYipJsUTa3ugm930Uzm8dnLxIkJEpBFoZWPqknDMTSZFvy2PU3g/hft2+IIuLSlOzHC7YxNdWBRA==", - "requires": { - "prom-client": "11.5.3" - } - }, - "@mojaloop/central-services-shared": { - "version": "11.5.2", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-11.5.2.tgz", - "integrity": "sha512-VqGAxndZycWvbsuGMdgkGhHW24EiC2dcFbnR8SfTbySlLuRtipVqVG2BXY65Vs1fp+f5ed+yCOF8jW/0WQHkIw==", + "@mojaloop/event-sdk": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-9.2.0.tgz", + "integrity": "sha512-CpdmsSAjieE+053gxbS+H1eeEiuXX2x0qDXhiGWjynMeEWdZhZsZnTACRDAKcxdqZjJdo2ioVw8XVWqaPeyZtA==", "requires": { - "@hapi/catbox": "11.1.1", - "@hapi/catbox-memory": "5.0.0", - "@mojaloop/central-services-error-handling": "10.6.0", - "@mojaloop/central-services-logger": "10.6.0", - "@mojaloop/central-services-metrics": "9.5.0", - "@mojaloop/event-sdk": "10.6.0", - "ajv": "6.12.6", - "ajv-keywords": "3.5.2", - "axios": "0.21.0", - "base64url": "3.0.1", - "clone": "2.1.2", - "data-urls": "2.0.0", - "dotenv": "8.2.0", - "env-var": "7.0.0", - "event-stream": "4.0.1", - "immutable": "3.8.2", - "lodash": "4.17.20", - "mustache": "4.1.0", - "openapi-backend": "3.6.3", - "raw-body": "2.4.1", + "@grpc/proto-loader": "0.5.3", + "@mojaloop/central-services-logger": "9.1.0", + "brototype": "0.0.6", + "error-callsites": "2.0.2", + "grpc": "1.24.2", + "lodash": "4.17.15", + "moment": "2.24.0", + "parse-strings-in-object": "2.0.0", + "protobufjs": "6.8.8", "rc": "1.2.8", - "shins": "2.6.0", - "uuid4": "2.0.2", - "widdershins": "4.0.1", - "yaml": "1.10.0" + "serialize-error": "4.1.0", + "sinon": "8.1.1", + "traceparent": "1.0.0", + "tslib": "1.10.0", + "uuid4": "1.1.4" }, "dependencies": { - "@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", - "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", + "@mojaloop/central-services-logger": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-logger/-/central-services-logger-9.1.0.tgz", + "integrity": "sha512-V45TPKI+0mqrSuQBOGH01yVotldu/6XCjsNKZ0M+82Kwhb0enQFSb4CKUr6TLjZINQfrNzQOofaSCJx8sUeSpg==", "requires": { - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "js-yaml": "^3.13.1" + "parse-strings-in-object": "2.0.0", + "rc": "1.2.8", + "winston": "3.2.1" } }, - "@apidevtools/swagger-parser": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.2.tgz", - "integrity": "sha512-JFxcEyp8RlNHgBCE98nwuTkZT6eNFPc1aosWV6wPcQph72TSEEu1k3baJD4/x1qznU+JiDdz8F5pTwabZh+Dhg==", - "requires": { - "@apidevtools/json-schema-ref-parser": "^9.0.6", - "@apidevtools/openapi-schemas": "^2.0.4", - "@apidevtools/swagger-methods": "^3.0.2", - "@jsdevtools/ono": "^7.1.3", - "call-me-maybe": "^1.0.1", - "z-schema": "^4.2.3" - } - }, - "@grpc/proto-loader": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", - "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", - "requires": { - "lodash.camelcase": "^4.3.0", - "protobufjs": "^6.8.6" - } - }, - "@hapi/catbox": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.1.tgz", - "integrity": "sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==", - "requires": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/podium": "4.x.x", - "@hapi/validate": "1.x.x" - } + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, - "@hapi/podium": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.1.tgz", - "integrity": "sha512-jh7a6+5Z4FUWzx8fgmxjaAa1DTBu+Qfg+NbVdo0f++rE5DgsVidUYrLDp3db65+QjDLleA2MfKQXkpT8ylBDXA==", + "sinon": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.1.1.tgz", + "integrity": "sha512-E+tWr3acRdoe1nXbHMu86SSqA1WGM7Yw3jZRLvlCMnXwTHP8lgFFVn5BnKnF26uc5SfZ3D7pA9sN7S3Y2jG4Ew==", "requires": { - "@hapi/hoek": "9.x.x", - "@hapi/teamwork": "5.x.x", - "@hapi/validate": "1.x.x" + "@sinonjs/commons": "^1.7.0", + "@sinonjs/formatio": "^4.0.1", + "@sinonjs/samsam": "^4.2.2", + "diff": "^4.0.2", + "lolex": "^5.1.2", + "nise": "^3.0.1", + "supports-color": "^7.1.0" } }, - "@hapi/teamwork": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.0.tgz", - "integrity": "sha512-llqoQTrAJDTXxG3c4Kz/uzhBS1TsmSBa/XG5SPcVXgmffHE1nFtyLIK0hNJHCB3EuBKT84adzd1hZNY9GJLWtg==" - }, - "@mojaloop/central-services-metrics": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-metrics/-/central-services-metrics-9.5.0.tgz", - "integrity": "sha512-4wba5JCNhmevBEHAPl+BmMqTmfT/7lOxbuRlziyAFhcySrZpCQhINMwyGm1CmNlldsDtp8rHaL5inQzKAGsBXA==", + "uuid4": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/uuid4/-/uuid4-1.1.4.tgz", + "integrity": "sha512-Gr1q2k40LpF8CokcnQFjPDsdslzJbTCTBG5xQIEflUov431gFkY5KduiGIeKYAamkQnNn4IfdHJbLnl9Bib8TQ==" + } + } + }, + "@mojaloop/forensic-logging-client": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@mojaloop/forensic-logging-client/-/forensic-logging-client-8.3.0.tgz", + "integrity": "sha512-kDWZeD4Xj7LzaTtr/kbaulGJSQVaOi2PVW/G2NWMuKARMnYcAbpF+m5uXcinz5Iun0CHtVrNVfh4/PFhvQ73Bg==", + "requires": { + "@mojaloop/central-services-logger": "8.1.2", + "bluebird": "3.7.1" + }, + "dependencies": { + "@mojaloop/central-services-logger": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-logger/-/central-services-logger-8.1.2.tgz", + "integrity": "sha512-wNnr07xcJNAy+KX2C8Djb6ubeH2c1KkfXMyMJz+/dKrfqyVcqcI0RuhneERZrJMI5Ah4X9Sjcuz+LqH9HQoW/w==", "requires": { - "prom-client": "11.5.3" + "winston": "3.2.1" } }, - "@mojaloop/event-sdk": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-10.6.0.tgz", - "integrity": "sha512-mDVow/3WDILDUF2v32fqcOZAoRQCOZX8D2fJF3kHvZLGthU9ydNPHK118aVibw76XAyq6E6UbxHMXg3ZUPBlhg==", + "bluebird": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", + "integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==" + } + } + }, + "@mojaloop/ml-number": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@mojaloop/ml-number/-/ml-number-11.0.0.tgz", + "integrity": "sha512-T2/RrzjzGop31Lrqhha3DtTlA3ARwZtSiwzneOvzf4eT1zR3MBzYZAsFn+O1gBhOwI9EQCNEeJdQMcfxKBMe3Q==", + "requires": { + "bignumber.js": "9.0.0" + }, + "dependencies": { + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + } + } + }, + "@mojaloop/sdk-standard-components": { + "version": "8.6.9", + "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-8.6.9.tgz", + "integrity": "sha512-2S1pmYm8rdAlgrzUhS67+vMpKWWWxYnq2p/Hd4idrWHehSz6C4b1oxF/e4wx4SxVbFkMwgdXQt4Dy4tvoswhbQ==", + "requires": { + "base64url": "^3.0.1", + "ilp-packet": "2.2.0", + "jsonwebtoken": "^8.5.1", + "jws": "^3.2.2", + "request": "^2.34", + "request-promise-native": "^1.0.7" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.4", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.4", + "fastq": "^1.6.0" + } + }, + "@now-ims/hapi-now-auth": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@now-ims/hapi-now-auth/-/hapi-now-auth-2.0.2.tgz", + "integrity": "sha512-fOhJUE5g6dO6SEen8HgH8Ty7KT9juwZhg8IQ4xqECDWJK84t/wDmCUWOSFyQTmzDIXa4RSja1edfJUZRv5zNtw==", + "requires": { + "@hapi/boom": "^7.4.11", + "@hapi/hoek": "^9.0.2", + "jsonwebtoken": "^8.5.1" + }, + "dependencies": { + "@hapi/boom": { + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", "requires": { - "@grpc/proto-loader": "0.5.4", - "@mojaloop/central-services-logger": "10.6.0", - "brototype": "0.0.6", - "error-callsites": "2.0.3", - "grpc": "1.24.3", - "lodash": "4.17.19", - "moment": "2.27.0", - "parse-strings-in-object": "2.0.0", - "protobufjs": "6.9.0", - "rc": "1.2.8", - "serialize-error": "4.1.0", - "sinon": "9.0.2", - "traceparent": "1.0.0", - "tslib": "2.0.0", - "uuid4": "2.0.2", - "winston": "3.3.3" + "@hapi/hoek": "8.x.x" }, "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "@hapi/hoek": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", + "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" } } - }, - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, - "@sinonjs/samsam": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.0.tgz", - "integrity": "sha512-hXpcfx3aq+ETVBwPlRFICld5EnrkexXuXDwqUNhDdr5L8VjvMeSRwyOa0qL7XFmR+jVWR4rUZtnxlG7RX72sBg==", + } + } + }, + "@npmcli/ci-detect": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz", + "integrity": "sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q==", + "dev": true + }, + "@npmcli/git": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.4.tgz", + "integrity": "sha512-OJZCmJ9DNn1cz9HPXXsPmUBnqaArot3CGYo63CyajHQk+g87rPXVOJByGsskQJhPsUUEXJcsZ2Q6bWd2jSwnBA==", + "dev": true, + "requires": { + "@npmcli/promise-spawn": "^1.1.0", + "lru-cache": "^6.0.0", + "mkdirp": "^1.0.3", + "npm-pick-manifest": "^6.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^1.1.1", + "semver": "^7.3.2", + "unique-filename": "^1.1.1", + "which": "^2.0.2" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" + "yallist": "^4.0.0" } }, - "@types/node": { - "version": "13.13.35", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.35.tgz", - "integrity": "sha512-q9aeOGwv+RRou/ca4aJVUM/jD5u7LBexu+rq9PkA/NhHNn8JifcMo94soKm0b6JGSfw/PSNdqtc428OscMvEYA==" + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "lru-cache": "^6.0.0" } }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" - }, - "axios": { - "version": "0.21.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz", - "integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==", + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "requires": { - "follow-redirects": "^1.10.0" + "isexe": "^2.0.0" } }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "optional": true - }, - "error-callsites": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/error-callsites/-/error-callsites-2.0.3.tgz", - "integrity": "sha512-v036z4IEffZFE5kBkV5/F2MzhLnG0vuDyN+VXpzCf4yWXvX/1WJCI0A+TGTr8HWzBfCw5k8gr9rwAo09V+obTA==" - }, - "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" - }, - "grpc": { - "version": "1.24.3", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.3.tgz", - "integrity": "sha512-EDemzuZTfhM0hgrXqC4PtR76O3t+hTIYJYR5vgiW0yt2WJqo4mhxUqZUirzUQz34Psz7dbLp38C6Cl7Ij2vXRQ==", - "requires": { - "@types/bytebuffer": "^5.0.40", - "lodash.camelcase": "^4.3.0", - "lodash.clone": "^4.5.0", - "nan": "^2.13.2", - "node-pre-gyp": "^0.15.0", - "protobufjs": "^5.0.3" - }, - "dependencies": { - "protobufjs": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", - "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", - "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" - } - } - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" - }, - "long": { + "yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "moment": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", - "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==" - }, - "mustache": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.1.0.tgz", - "integrity": "sha512-0FsgP/WVq4mKyjolIyX+Z9Bd+3WS8GOwoUTyKXT5cTYMGeauNTi2HPCwERqseC1IHAy0Z7MDZnJBfjabd4O8GQ==" - }, - "nise": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", - "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "requires": { - "fn.name": "1.x.x" - } - }, - "openapi-backend": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/openapi-backend/-/openapi-backend-3.6.3.tgz", - "integrity": "sha512-o2/qroZKAC1t5CSiSUDHlFicBibQiP4Z2unkqn+OoE68B0H3WpYdykhb7hJQTROWYR72gQrJDcPdBFKiI9TqRg==", - "requires": { - "ajv": "^6.10.0", - "bath-es5": "^3.0.3", - "cookie": "^0.4.0", - "lodash": "^4.17.15", - "mock-json-schema": "^1.0.7", - "openapi-schema-validator": "^7.0.1", - "openapi-types": "^7.0.1", - "qs": "^6.9.3", - "swagger-parser": "^10.0.2" - } - }, - "openapi-types": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-7.0.1.tgz", - "integrity": "sha512-6pi4/Fw+JIW1HHda2Ij7LRJ5QJ8f6YzaXnsRA6m44BJz8nLq/j5gVFzPBKJo+uOFhAeHqZC/3uzhTpYPga3Q/A==" - }, - "protobufjs": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.9.0.tgz", - "integrity": "sha512-LlGVfEWDXoI/STstRDdZZKb/qusoAWUnmLg9R8OLSO473mBLWHowx8clbX5/+mKDEI+v7GzjoK9tRPZMMcoTrg==", - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" - } - }, - "qs": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", - "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==" - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "sinon": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", - "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==", - "requires": { - "@sinonjs/commons": "^1.7.2", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.0.3", - "diff": "^4.0.2", - "nise": "^4.0.1", - "supports-color": "^7.1.0" - } - }, - "swagger-parser": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-10.0.2.tgz", - "integrity": "sha512-9jHkHM+QXyLGFLk1DkXBwV+4HyNm0Za3b8/zk/+mjr8jgOSiqm3FOTHBSDsBjtn9scdL+8eWcHdupp2NLM8tDw==", - "requires": { - "@apidevtools/swagger-parser": "10.0.2" - } - }, - "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" - }, - "validator": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-12.2.0.tgz", - "integrity": "sha512-jJfE/DW6tIK1Ek8nCfNFqt8Wb3nzMoAbocBF6/Icgg1ZFSBpObdnwVY2jQj6qUqzhx5jc71fpvBWyLGO7Xl+nQ==" - }, - "winston": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", - "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", - "requires": { - "@dabh/diagnostics": "^2.0.2", - "async": "^3.1.0", - "is-stream": "^2.0.0", - "logform": "^2.2.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.4.0" - } - }, - "z-schema": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-4.2.3.tgz", - "integrity": "sha512-zkvK/9TC6p38IwcrbnT3ul9in1UX4cm1y/VZSs4GHKIiDCrlafc+YQBgQBUdDXLAoZHf2qvQ7gJJOo6yT1LH6A==", - "requires": { - "commander": "^2.7.1", - "lodash.get": "^4.4.2", - "lodash.isequal": "^4.5.0", - "validator": "^12.0.0" - } + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, - "@mojaloop/central-services-stream": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-stream/-/central-services-stream-10.6.0.tgz", - "integrity": "sha512-1f+027JPvXL/xT4Z9YgTB+dbNCSi77qI9AqSFlBq/QYz1BpWWWmBAwKCoj/IKP+9LBPkkpSC6Xq+TcmCvCpzUw==", + "@npmcli/installed-package-contents": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.5.tgz", + "integrity": "sha512-aKIwguaaqb6ViwSOFytniGvLPb9SMCUm39TgM3SfUo7n0TxUMbwoXfpwyvQ4blm10lzbAwTsvjr7QZ85LvTi4A==", + "dev": true, "requires": { - "@mojaloop/central-services-error-handling": "10.6.0", - "@mojaloop/central-services-logger": "10.6.0", - "async": "3.2.0", - "events": "3.1.0", - "node-rdkafka": "2.9.0" - }, - "dependencies": { - "node-rdkafka": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/node-rdkafka/-/node-rdkafka-2.9.0.tgz", - "integrity": "sha512-lVBb3J/KVMDXUSdC0avoNZ/9Yab9XiDMTFPKdMkXc4AjaIafVPGLNa5yVV7hly9pBfZ5yIHF71sAI4SH/E5G4Q==", - "requires": { - "bindings": "^1.3.1", - "nan": "^2.14.0" - } - } + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1", + "read-package-json-fast": "^1.1.1", + "readdir-scoped-modules": "^1.1.0" } }, - "@mojaloop/event-sdk": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-9.2.0.tgz", - "integrity": "sha512-CpdmsSAjieE+053gxbS+H1eeEiuXX2x0qDXhiGWjynMeEWdZhZsZnTACRDAKcxdqZjJdo2ioVw8XVWqaPeyZtA==", + "@npmcli/move-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.0.tgz", + "integrity": "sha512-Iv2iq0JuyYjKeFkSR4LPaCdDZwlGK9X2cP/01nJcp3yMJ1FjNd9vpiEYvLUgzBxKPg2SFmaOhizoQsPc0LWeOQ==", + "dev": true, "requires": { - "@grpc/proto-loader": "0.5.3", - "@mojaloop/central-services-logger": "9.1.0", - "brototype": "0.0.6", - "error-callsites": "2.0.2", - "grpc": "1.24.2", - "lodash": "4.17.15", - "moment": "2.24.0", - "parse-strings-in-object": "2.0.0", - "protobufjs": "6.8.8", - "rc": "1.2.8", - "serialize-error": "4.1.0", - "sinon": "8.1.1", - "traceparent": "1.0.0", - "tslib": "1.10.0", - "uuid4": "1.1.4" + "mkdirp": "^1.0.4", + "rimraf": "^2.7.1" }, "dependencies": { - "@mojaloop/central-services-logger": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-logger/-/central-services-logger-9.1.0.tgz", - "integrity": "sha512-V45TPKI+0mqrSuQBOGH01yVotldu/6XCjsNKZ0M+82Kwhb0enQFSb4CKUr6TLjZINQfrNzQOofaSCJx8sUeSpg==", - "requires": { - "parse-strings-in-object": "2.0.0", - "rc": "1.2.8", - "winston": "3.2.1" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" - }, - "sinon": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-8.1.1.tgz", - "integrity": "sha512-E+tWr3acRdoe1nXbHMu86SSqA1WGM7Yw3jZRLvlCMnXwTHP8lgFFVn5BnKnF26uc5SfZ3D7pA9sN7S3Y2jG4Ew==", - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/formatio": "^4.0.1", - "@sinonjs/samsam": "^4.2.2", - "diff": "^4.0.2", - "lolex": "^5.1.2", - "nise": "^3.0.1", - "supports-color": "^7.1.0" - } - }, - "uuid4": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/uuid4/-/uuid4-1.1.4.tgz", - "integrity": "sha512-Gr1q2k40LpF8CokcnQFjPDsdslzJbTCTBG5xQIEflUov431gFkY5KduiGIeKYAamkQnNn4IfdHJbLnl9Bib8TQ==" + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true } } }, - "@mojaloop/forensic-logging-client": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@mojaloop/forensic-logging-client/-/forensic-logging-client-8.3.0.tgz", - "integrity": "sha512-kDWZeD4Xj7LzaTtr/kbaulGJSQVaOi2PVW/G2NWMuKARMnYcAbpF+m5uXcinz5Iun0CHtVrNVfh4/PFhvQ73Bg==", - "requires": { - "@mojaloop/central-services-logger": "8.1.2", - "bluebird": "3.7.1" - }, - "dependencies": { - "@mojaloop/central-services-logger": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-logger/-/central-services-logger-8.1.2.tgz", - "integrity": "sha512-wNnr07xcJNAy+KX2C8Djb6ubeH2c1KkfXMyMJz+/dKrfqyVcqcI0RuhneERZrJMI5Ah4X9Sjcuz+LqH9HQoW/w==", - "requires": { - "winston": "3.2.1" - } - }, - "bluebird": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", - "integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==" - } - } - }, - "@mojaloop/ml-number": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/@mojaloop/ml-number/-/ml-number-11.0.0.tgz", - "integrity": "sha512-T2/RrzjzGop31Lrqhha3DtTlA3ARwZtSiwzneOvzf4eT1zR3MBzYZAsFn+O1gBhOwI9EQCNEeJdQMcfxKBMe3Q==", - "requires": { - "bignumber.js": "9.0.0" - } - }, - "@mojaloop/sdk-standard-components": { - "version": "8.6.9", - "resolved": "https://registry.npmjs.org/@mojaloop/sdk-standard-components/-/sdk-standard-components-8.6.9.tgz", - "integrity": "sha512-2S1pmYm8rdAlgrzUhS67+vMpKWWWxYnq2p/Hd4idrWHehSz6C4b1oxF/e4wx4SxVbFkMwgdXQt4Dy4tvoswhbQ==", - "requires": { - "base64url": "^3.0.1", - "ilp-packet": "2.2.0", - "jsonwebtoken": "^8.5.1", - "jws": "^3.2.2", - "request": "^2.34", - "request-promise-native": "^1.0.7" - } - }, - "@now-ims/hapi-now-auth": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@now-ims/hapi-now-auth/-/hapi-now-auth-2.0.2.tgz", - "integrity": "sha512-fOhJUE5g6dO6SEen8HgH8Ty7KT9juwZhg8IQ4xqECDWJK84t/wDmCUWOSFyQTmzDIXa4RSja1edfJUZRv5zNtw==", - "requires": { - "@hapi/boom": "^7.4.11", - "@hapi/hoek": "^9.0.2", - "jsonwebtoken": "^8.5.1" - }, - "dependencies": { - "@hapi/boom": { - "version": "7.4.11", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", - "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", - "requires": { - "@hapi/hoek": "8.x.x" - }, - "dependencies": { - "@hapi/hoek": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz", - "integrity": "sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==" - } - } - } - } - }, - "@npmcli/ci-detect": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@npmcli/ci-detect/-/ci-detect-1.3.0.tgz", - "integrity": "sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q==", - "dev": true - }, - "@npmcli/git": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.4.tgz", - "integrity": "sha512-OJZCmJ9DNn1cz9HPXXsPmUBnqaArot3CGYo63CyajHQk+g87rPXVOJByGsskQJhPsUUEXJcsZ2Q6bWd2jSwnBA==", - "dev": true, - "requires": { - "@npmcli/promise-spawn": "^1.1.0", - "lru-cache": "^6.0.0", - "mkdirp": "^1.0.3", - "npm-pick-manifest": "^6.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^1.1.1", - "semver": "^7.3.2", - "unique-filename": "^1.1.1", - "which": "^2.0.2" - }, - "dependencies": { - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } - } - }, - "@npmcli/installed-package-contents": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.5.tgz", - "integrity": "sha512-aKIwguaaqb6ViwSOFytniGvLPb9SMCUm39TgM3SfUo7n0TxUMbwoXfpwyvQ4blm10lzbAwTsvjr7QZ85LvTi4A==", - "dev": true, - "requires": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1", - "read-package-json-fast": "^1.1.1", - "readdir-scoped-modules": "^1.1.0" - } - }, - "@npmcli/move-file": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.0.1.tgz", - "integrity": "sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw==", - "dev": true, - "requires": { - "mkdirp": "^1.0.4" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - } - } - }, - "@npmcli/node-gyp": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.1.tgz", - "integrity": "sha512-pBqoKPWmuk9iaEcXlLBVRIA6I1kG9JiICU+sG0NuD6NAR461F+02elHJS4WkQxHW2W5rnsfvP/ClKwmsZ9RaaA==", - "dev": true - }, - "@npmcli/promise-spawn": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", - "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", - "dev": true, + "@npmcli/node-gyp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.1.tgz", + "integrity": "sha512-pBqoKPWmuk9iaEcXlLBVRIA6I1kG9JiICU+sG0NuD6NAR461F+02elHJS4WkQxHW2W5rnsfvP/ClKwmsZ9RaaA==", + "dev": true + }, + "@npmcli/promise-spawn": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", + "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "dev": true, "requires": { "infer-owner": "^1.0.4" } @@ -3431,36 +2945,122 @@ "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true }, + "@types/babel__core": { + "version": "7.1.12", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", + "integrity": "sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", + "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", + "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.0.tgz", + "integrity": "sha512-kSjgDMZONiIfSH1Nxcr5JIRMwUetDki63FSQfpTCz8ogF3Ulqm8+mr5f78dUYs6vMiB6gBusQqfQmBvHZj/lwg==", + "dev": true, + "requires": { + "@babel/types": "^7.3.0" + } + }, "@types/bytebuffer": { - "version": "5.0.41", - "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.41.tgz", - "integrity": "sha512-Mdrv4YcaHvpkx25ksqqFaezktx3yZRcd51GZY0rY/9avyaqZdiT/GiWRhfrJhMpgzXqTOSHgGvsumGxJFNiZZA==", + "version": "5.0.42", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.42.tgz", + "integrity": "sha512-lEgKojWUAc/MG2t649oZS5AfYFP2xRNPoDuwDBlBMjHXd8MaGPgFgtCXUK7inZdBOygmVf10qxc1Us8GXC96aw==", "requires": { "@types/long": "*", "@types/node": "*" } }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "@types/graceful-fs": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.4.tgz", + "integrity": "sha512-mWA/4zFQhfvOA8zWkXobwJvBD7vzcxgrOQ0J5CH1votGqdq9m7+FwtGaqyCZqC3NyyBkc9z4m+iry4LlqcMWJg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", "dev": true }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz", + "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/lodash": { + "version": "4.14.168", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz", + "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==", + "dev": true + }, "@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" }, "@types/node": { - "version": "10.17.28", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.28.tgz", - "integrity": "sha512-dzjES1Egb4c1a89C7lKwQh8pwjYmlOAG9dW1pBgxEk57tMrLnssOfEthz8kdkNaBd7lIqQx7APm5+mZ619IiCQ==" + "version": "10.17.50", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.50.tgz", + "integrity": "sha512-vwX+/ija9xKc/z9VqMCdbf4WYcMTGsI0I/L/6shIF3qXURxZOhPQlPRHtjTpiNhAwn0paMJzlOQqw6mAGEQnTA==" + }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "@types/prettier": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.6.tgz", + "integrity": "sha512-6gOkRe7OIioWAXfnO/2lFiv+SJichKVSys1mSsgyrYHSEjk8Ctv4tSR/Odvnu+HWlH2C8j53dahU03XmQdd5fA==", + "dev": true }, "@types/protobufjs": { "version": "6.0.0", @@ -3470,10 +3070,31 @@ "protobufjs": "*" } }, + "@types/stack-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", + "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", + "dev": true + }, + "@types/yargs": { + "version": "15.0.12", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.12.tgz", + "integrity": "sha512-f+fD/fQAo3BCbCDlrUpznF1A5Zp9rB0noS5vnoormHSIPFKL0Z2DcUJ3Gxp5ytH4uLRNxy7AwYUC9exZzqGMAw==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz", + "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", + "dev": true + }, "abab": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.4.tgz", - "integrity": "sha512-Eu9ELJWCz/c1e9gTiCY+FceWxcqzjYEbqMgtndnuSqZSUCOL73TWNK2mHfIj4Cw2E/ongOp+JISVNCmovt2KYQ==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" }, "abbrev": { "version": "1.1.1", @@ -3490,15 +3111,31 @@ } }, "acorn": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", - "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, + "acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + } + }, "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true + }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true }, "agent-base": { @@ -3518,6 +3155,12 @@ "requires": { "ms": "2.1.2" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, @@ -3540,13 +3183,19 @@ "requires": { "ms": "2.1.2" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, "aggregate-error": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", - "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "requires": { "clean-stack": "^2.0.0", @@ -3554,9 +3203,9 @@ } }, "ajv": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", - "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -3565,9 +3214,9 @@ } }, "ajv-keywords": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.1.tgz", - "integrity": "sha512-KWcq3xN8fDjSB+IMoh2VaXVhRI0BBGxoYp3rx7Pkb6z0cFjYR9Q9l4yZqqals0/zsioCmocC5H6UvsGD4MoIBA==" + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" }, "align-text": { "version": "0.1.4", @@ -3604,6 +3253,12 @@ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -3704,24 +3359,53 @@ "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "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=" - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "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" + } + }, + "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==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "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=" + }, + "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==" }, "arr-union": { @@ -3756,46 +3440,6 @@ "es-abstract": "^1.18.0-next.1", "get-intrinsic": "^1.0.1", "is-string": "^1.0.5" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - } } }, "array-slice": { @@ -3830,46 +3474,6 @@ "call-bind": "^1.0.0", "define-properties": "^1.1.3", "es-abstract": "^1.18.0-next.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - } } }, "array.prototype.flatmap": { @@ -3882,46 +3486,6 @@ "define-properties": "^1.1.3", "es-abstract": "^1.18.0-next.1", "function-bind": "^1.1.1" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - } } }, "asap": { @@ -3962,15 +3526,21 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "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=" }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async": { @@ -4009,13 +3579,35 @@ "yargs-parser": "^18.1.3" }, "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -4040,16 +3632,130 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "requires": { + "follow-redirects": "^1.10.0" + }, + "dependencies": { + "follow-redirects": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" + } + } + }, + "babel-jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", + "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==", + "dev": true, + "requires": { + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "babel-plugin-istanbul": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz", + "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz", + "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==", + "dev": true, "requires": { - "follow-redirects": "1.5.10" + "babel-plugin-jest-hoist": "^26.6.2", + "babel-preset-current-node-syntax": "^1.0.0" } }, "balanced-match": { @@ -4140,21 +3846,21 @@ }, "dependencies": { "core-js": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.1.tgz", - "integrity": "sha512-9Id2xHY1W7m8hCl8NkhQn5CufmF/WuR30BTRewvCXc1aZd3kMECwNZ69ndLbekKfakw9Rf2Xyc+QR6E7Gg+obg==" + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.2.tgz", + "integrity": "sha512-FfApuSRgrR6G5s58casCBd9M2k+4ikuu4wbW6pJyYU7bd9zvFc9qf7vr5xmrZOhT9nn+8uwlH1oRR9jTnFoA3A==" } } }, "bignumber.js": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", - "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==" }, "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, "bindings": { "version": "1.5.0", @@ -4176,6 +3882,44 @@ "requires": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "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" + }, + "dependencies": { + "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==" + } + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "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==" + } + } + } } }, "blipp": { @@ -4218,18 +3962,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "joi": { - "version": "17.3.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.3.0.tgz", - "integrity": "sha512-Qh5gdU6niuYbUIUV5ejbsMiiFmBdw8Kcp8Buj2JntszCkCfxJ9Cz76OtHxOZMPXrt5810iDIXs+n1nNVoquHgg==", - "requires": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.0", - "@sideway/formula": "^3.0.0", - "@sideway/pinpoint": "^2.0.0" - } } } }, @@ -4383,12 +4115,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -4464,10 +4190,25 @@ "resolved": "https://registry.npmjs.org/brototype/-/brototype-0.0.6.tgz", "integrity": "sha1-mz8HNkeDOXuPHEvuehQZk1ZuS0Q=" }, + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, "bson": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz", - "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==" + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", + "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" }, "buffer-equal-constant-time": { "version": "1.0.1", @@ -4583,9 +4324,9 @@ } }, "tar": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.5.tgz", - "integrity": "sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", + "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", "dev": true, "requires": { "chownr": "^2.0.0", @@ -4665,13 +4406,12 @@ } }, "call-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", - "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "requires": { "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.0" + "get-intrinsic": "^1.0.2" } }, "call-me-maybe": { @@ -4689,6 +4429,15 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" }, + "capture-exit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", + "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", + "dev": true, + "requires": { + "rsvp": "^4.8.4" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -4712,6 +4461,35 @@ "lazy-cache": "^1.0.3" } }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "chai-exclude": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/chai-exclude/-/chai-exclude-2.0.2.tgz", + "integrity": "sha512-QmNVnvdSw8Huccdjm49mKu3HtoHxvjdavgYkY0KPQ5MI5UWfbc9sX1YqRgaMPf2GGtDXPoF2ram3AeNS4945Xw==", + "dev": true, + "requires": { + "fclone": "^1.0.11" + } + }, + "chai-subset": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/chai-subset/-/chai-subset-1.6.0.tgz", + "integrity": "sha1-pdDKFOMpp5WW7XAFi2ZGvWmIz+k=", + "dev": true + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -4738,9 +4516,15 @@ } }, "chance": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.6.tgz", - "integrity": "sha512-DXLzaGjasDWbvlFAJyQBIwlzdQZuPdz4of9TTTxmHTjja88ZU/vBwUwxxjalSt43zWTPrhiJT0z0N4bZqfZS9w==", + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/chance/-/chance-1.1.7.tgz", + "integrity": "sha512-bua/2cZEfzS6qPm0vi3JEvGNbriDLcMj9lKxCQOjUcCJRcyjA7umP0zZm6bKWWlBN04vA0L99QGH/CZQawr0eg==", + "dev": true + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, "chardet": { @@ -4749,27 +4533,46 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, "cheerio": { - "version": "1.0.0-rc.3", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz", - "integrity": "sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==", + "version": "1.0.0-rc.5", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.5.tgz", + "integrity": "sha512-yoqps/VCaZgN4pfXtenwHROTp8NG6/Hlt4Jpz2FEP0ZJQ+ZUkVDd0hAPDNKhj3nakpfPt/CNs57yEtxD1bXQiw==", + "requires": { + "cheerio-select-tmp": "^0.1.0", + "dom-serializer": "~1.2.0", + "domhandler": "^4.0.0", + "entities": "~2.1.0", + "htmlparser2": "^6.0.0", + "parse5": "^6.0.0", + "parse5-htmlparser2-tree-adapter": "^6.0.0" + } + }, + "cheerio-select-tmp": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/cheerio-select-tmp/-/cheerio-select-tmp-0.1.1.tgz", + "integrity": "sha512-YYs5JvbpU19VYJyj+F7oYrIE2BOll1/hRU7rEy/5+v9BzkSo3bK81iAeeQEMI92vRIxz677m72UmJUiVwwgjfQ==", "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.1", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash": "^4.15.0", - "parse5": "^3.0.1" + "css-select": "^3.1.2", + "css-what": "^4.0.0", + "domelementtype": "^2.1.0", + "domhandler": "^4.0.0", + "domutils": "^2.4.4" } }, "chokidar": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", - "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.0.tgz", + "integrity": "sha512-JgQM9JS92ZbFR4P90EvmzNpSGhpPBGBSj10PILeDyYFwp4h2/D9OM03wsJ4zW1fEp4ka2DGrnUeD7FuvQ2aZ2Q==", "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.2", + "fsevents": "~2.3.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -4833,6 +4636,12 @@ "integrity": "sha1-cDhrG0jidz0NYxZqVa/5TvRFahI=", "dev": true }, + "cjs-module-lexer": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", + "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", + "dev": true + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -4891,12 +4700,6 @@ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -4970,6 +4773,12 @@ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -5002,9 +4811,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", - "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", + "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -5102,6 +4911,11 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "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==" } } }, @@ -5120,6 +4934,38 @@ "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": 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" + } + }, + "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==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "configstore": { @@ -5134,23 +4980,6 @@ "unique-string": "^2.0.0", "write-file-atomic": "^3.0.0", "xdg-basedir": "^4.0.0" - }, - "dependencies": { - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - } } }, "console-control-strings": { @@ -5170,6 +4999,13 @@ "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", "requires": { "safe-buffer": "5.1.2" + }, + "dependencies": { + "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==" + } } }, "content-type": { @@ -5184,6 +5020,14 @@ "dev": true, "requires": { "safe-buffer": "~5.1.1" + }, + "dependencies": { + "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==", + "dev": true + } } }, "cookie": { @@ -5196,15 +5040,21 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "dev": true + }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "core-js": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", - "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" }, "core-util-is": { "version": "1.0.2", @@ -5238,20 +5088,44 @@ "dev": true }, "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-3.1.2.tgz", + "integrity": "sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA==", "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" + "boolbase": "^1.0.0", + "css-what": "^4.0.0", + "domhandler": "^4.0.0", + "domutils": "^2.4.3", + "nth-check": "^2.0.0" } }, "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-4.0.0.tgz", + "integrity": "sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A==" + }, + "cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "dev": true + }, + "cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dev": true, + "requires": { + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + } + } }, "dashdash": { "version": "1.14.1", @@ -5316,6 +5190,15 @@ "mimic-response": "^1.0.0" } }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, "deep-equal": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.1.2.tgz", @@ -5333,6 +5216,12 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, "default-require-extensions": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", @@ -5441,9 +5330,9 @@ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, "denque": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", - "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", + "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" }, "depd": { "version": "1.1.2", @@ -5465,6 +5354,12 @@ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, "dezalgo": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", @@ -5490,10 +5385,33 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" }, + "diff-sequences": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + }, + "dependencies": { + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + } + } + }, "djv": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/djv/-/djv-2.1.2.tgz", - "integrity": "sha512-ltQSINn+7aMTp7pKeQpfZg2ACd/Gy6VrL3LYuT25/plwPBb7xlGOekr463Luqn816AWJLuP7KZQGFct2JICyeA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/djv/-/djv-2.1.4.tgz", + "integrity": "sha512-giDn+BVbtLlwtkvtcsZjbjzpALHB77skiv3FIu6Wp8b5j8BunDcVJYH0cGUaexp6s0Sb7IkquXXjsLBJhXwQpA==", "dev": true, "requires": { "@korzio/djv-draft-04": "^2.0.1" @@ -5514,34 +5432,53 @@ } }, "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz", + "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==", "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "entities": "^2.0.0" } }, "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", + "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==" + }, + "domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "dev": true, + "requires": { + "webidl-conversions": "^5.0.0" + }, + "dependencies": { + "webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "dev": true + } + } }, "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", + "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", "requires": { - "domelementtype": "1" + "domelementtype": "^2.1.0" } }, "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.4.4.tgz", + "integrity": "sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==", "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "dom-serializer": "^1.0.1", + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0" } }, "dot": { @@ -5550,11 +5487,18 @@ "integrity": "sha512-/nt74Rm+PcfnirXGEdhZleTwGC2LMnuKTeeTIlI82xb5loBBoXNYzr2ezCroPSMtilK8EZIfcNZwOcHN+ib1Lg==" }, "dot-prop": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.1.tgz", - "integrity": "sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", "requires": { - "is-obj": "^1.0.0" + "is-obj": "^2.0.0" + }, + "dependencies": { + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" + } } }, "dotenv": { @@ -5578,9 +5522,9 @@ "dev": true }, "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=" + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" }, "duplexer3": { "version": "0.1.4", @@ -5597,18 +5541,6 @@ "inherits": "^2.0.3", "readable-stream": "^3.1.1", "stream-shift": "^1.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } } }, "easy-table": { @@ -5664,12 +5596,17 @@ "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.4.tgz", "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "emittery": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", + "integrity": "sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==", "dev": true }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "enabled": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", @@ -5714,18 +5651,12 @@ } }, "enjoi": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/enjoi/-/enjoi-4.1.1.tgz", - "integrity": "sha512-JTM4zGxiH0SqOZeRm4HcrdGgJN/4vJVNfJWchRbecFbH69S2uka2na5FfnTnwoad3BDRFwEVS5PJO+GtoWMG0A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/enjoi/-/enjoi-7.0.0.tgz", + "integrity": "sha512-GnrLvm5Vu8zXxnet3rnt9/WkyY2hewcWEnaBMVNROXkQa2WK3ZkkfLew4PP8DVRSdjMH9N+f2mMjwHw5Yo3PdQ==", "requires": { - "hoek": "^5.0.4" - }, - "dependencies": { - "hoek": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-5.0.4.tgz", - "integrity": "sha512-Alr4ZQgoMlnere5FZJsIyfIjORBqZll5POhDsF4q64dPuJR6rNxXdDxtHSQq8OXRurhmx+PWYEE8bXRROY8h0w==" - } + "@hapi/bourne": "^2.0.0", + "@hapi/hoek": "^9.0.3" } }, "enquirer": { @@ -5738,9 +5669,9 @@ } }, "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" }, "env-paths": { "version": "2.2.0", @@ -5785,30 +5716,32 @@ } }, "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } }, "es-get-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", - "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.1.tgz", + "integrity": "sha512-qorBw8Y7B15DVLaJWy6WdEV/ZkieBcu6QCq/xzWzGOKJqgG1j754vXRfZ3NY7HSShneqU43mPB4OkQBTkvHhFw==", "dev": true, "requires": { - "es-abstract": "^1.17.4", + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.1", "has-symbols": "^1.0.1", "is-arguments": "^1.0.4", "is-map": "^2.0.1", @@ -5842,10 +5775,9 @@ "dev": true }, "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", + "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" }, "escalade": { "version": "3.1.1", @@ -5868,63 +5800,142 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, - "eslint": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.15.0.tgz", - "integrity": "sha512-Vr64xFDT8w30wFll643e7cGrIkPEU50yIiI36OdSIDoSGguIeaLzBo0vpGvzo9RECUqq7htURfwEtKqwytkqzA==", + "escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.2.2", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.2.0", + "esprima": "^4.0.1", + "estraverse": "^4.2.0", "esutils": "^2.0.2", - "file-entry-cache": "^6.0.0", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash": "^4.17.19", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^5.2.3", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.8.1", + "source-map": "~0.6.1" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + } + } + }, + "eslint": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz", + "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@eslint/eslintrc": "^0.3.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.2.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.0", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "@eslint/eslintrc": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", + "integrity": "sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { "color-convert": "^2.0.1" } }, @@ -5973,64 +5984,6 @@ "ms": "2.1.2" } }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "dev": true - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "file-entry-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", - "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", - "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", - "dev": true - }, "glob-parent": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", @@ -6049,21 +6002,18 @@ "yallist": "^4.0.0" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, "semver": { "version": "7.3.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", @@ -6227,6 +6177,12 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", @@ -6288,111 +6244,215 @@ "isarray": "^1.0.0" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "eslint-plugin-node": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", - "dev": true, - "requires": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" - }, - "dependencies": { - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "eslint-plugin-promise": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", - "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", - "dev": true - }, - "eslint-plugin-react": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.21.5.tgz", - "integrity": "sha512-8MaEggC2et0wSF6bUeywF7qQ46ER81irOdWS4QWxnnlAEsnzeBevk1sWh7fhpCghPpXb+8Ks7hvaft6L/xsR6g==", - "dev": true, - "requires": { - "array-includes": "^3.1.1", - "array.prototype.flatmap": "^1.2.3", - "doctrine": "^2.1.0", - "has": "^1.0.3", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "object.entries": "^1.1.2", - "object.fromentries": "^2.0.2", - "object.values": "^1.1.1", - "prop-types": "^15.7.2", - "resolve": "^1.18.1", - "string.prototype.matchall": "^4.0.2" - }, - "dependencies": { - "doctrine": { + "find-up": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "esutils": "^2.0.2" + "locate-path": "^2.0.0" } }, - "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "is-core-module": "^2.1.0", - "path-parse": "^1.0.6" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" } - } - } - }, - "eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "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" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + } + } + }, + "eslint-plugin-node": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", + "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "dev": true, + "requires": { + "eslint-plugin-es": "^3.0.0", + "eslint-utils": "^2.0.0", + "ignore": "^5.1.1", + "minimatch": "^3.0.4", + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "eslint-plugin-promise": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", + "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", + "dev": true + }, + "eslint-plugin-react": { + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.21.5.tgz", + "integrity": "sha512-8MaEggC2et0wSF6bUeywF7qQ46ER81irOdWS4QWxnnlAEsnzeBevk1sWh7fhpCghPpXb+8Ks7hvaft6L/xsR6g==", + "dev": true, + "requires": { + "array-includes": "^3.1.1", + "array.prototype.flatmap": "^1.2.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "object.entries": "^1.1.2", + "object.fromentries": "^2.0.2", + "object.values": "^1.1.1", + "prop-types": "^15.7.2", + "resolve": "^1.18.1", + "string.prototype.matchall": "^4.0.2" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true }, "esm": { @@ -6411,10 +6471,10 @@ "eslint-visitor-keys": "^1.3.0" }, "dependencies": { - "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", "dev": true } } @@ -6442,12 +6502,20 @@ } }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "estraverse": { @@ -6492,6 +6560,12 @@ "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=", "dev": true }, + "exec-sh": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz", + "integrity": "sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A==", + "dev": true + }, "execa": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", @@ -6506,6 +6580,12 @@ "strip-eof": "^1.0.0" } }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -6559,6 +6639,46 @@ "homedir-polyfill": "^1.0.1" } }, + "expect": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", + "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "ansi-styles": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, "express": { "version": "4.17.1", "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", @@ -6623,6 +6743,11 @@ "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "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==" } } }, @@ -6735,41 +6860,118 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fast-safe-stringify": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" - }, - "faucet": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/faucet/-/faucet-0.0.1.tgz", - "integrity": "sha1-WX3PHSGJosBiMhtZHo8VHtIDnZw=", + "fast-glob": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", "dev": true, "requires": { - "defined": "0.0.0", - "duplexer": "~0.1.1", - "minimist": "0.0.5", - "sprintf": "~0.1.3", - "tap-parser": "~0.4.0", - "tape": "~2.3.2", - "through2": "~0.2.3" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" }, "dependencies": { - "minimist": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", - "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, + "fastq": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.10.0.tgz", + "integrity": "sha512-NL2Qc5L3iQEsyYzweq7qfgy5OtXCmGzGvhElGEd/SoFWEMOEczNh5s5ocaF01HDetxz+p8ecjNPA6cZxxIHmzA==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "faucet": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/faucet/-/faucet-0.0.1.tgz", + "integrity": "sha1-WX3PHSGJosBiMhtZHo8VHtIDnZw=", + "dev": true, + "requires": { + "defined": "0.0.0", + "duplexer": "~0.1.1", + "minimist": "0.0.5", + "sprintf": "~0.1.3", + "tap-parser": "~0.4.0", + "tape": "~2.3.2", + "through2": "~0.2.3" + }, + "dependencies": { + "minimist": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", + "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=", "dev": true }, "tape": { @@ -6788,6 +6990,21 @@ } } }, + "fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "fclone": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz", + "integrity": "sha1-EOhdo4v+p/xZk0HClu4ddyZu5kA=", + "dev": true + }, "fecha": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz", @@ -6809,12 +7026,12 @@ } }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", + "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "file-uri-to-path": { @@ -6894,11 +7111,12 @@ } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, "findup-sync": { @@ -6940,37 +7158,25 @@ "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==" }, "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - }, - "dependencies": { - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - } - } + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "dependencies": { "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" @@ -6979,9 +7185,9 @@ } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", + "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", "dev": true }, "fn.name": { @@ -7097,6 +7303,12 @@ "resolved": "https://registry.npmjs.org/format-util/-/format-util-1.0.5.tgz", "integrity": "sha512-varLbTj0e0yVyRpqQhuWV+8hlePAgaoFRhNFj50BNjEIrw1/DphHSObtqwskVCPWNgzwPoQrZAbfa/SBiicNeg==" }, + "formidable": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", + "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==", + "dev": true + }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -7127,9 +7339,9 @@ "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=" }, "fromentries": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.1.tgz", - "integrity": "sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", "dev": true }, "fs-minipass": { @@ -7178,9 +7390,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.1.tgz", + "integrity": "sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==", "optional": true }, "function-bind": { @@ -7210,9 +7422,9 @@ } }, "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, "get-caller-file": { @@ -7220,11 +7432,16 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, + "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-intrinsic": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", - "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", - "dev": true, + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz", + "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -7260,17 +7477,6 @@ "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", "requires": { "pump": "^3.0.0" - }, - "dependencies": { - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } } }, "get-value": { @@ -7324,12 +7530,20 @@ } }, "global-dirs": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz", - "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", + "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", "dev": true, "requires": { - "ini": "^1.3.5" + "ini": "1.3.7" + }, + "dependencies": { + "ini": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "dev": true + } } }, "global-modules": { @@ -7419,6 +7633,13 @@ "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true, + "optional": true + }, "grpc": { "version": "1.24.2", "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.2.tgz", @@ -7892,51 +8113,43 @@ } }, "hapi-openapi": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/hapi-openapi/-/hapi-openapi-1.2.6.tgz", - "integrity": "sha512-8YP3pInoUAb8yYpPmKgfdbv7kGntrWbpaAjS4Hr7zr8uf2kiadhdR4AdBj9dXJNmgmkHApKFEGMOPWWFwC/1uA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hapi-openapi/-/hapi-openapi-2.0.2.tgz", + "integrity": "sha512-khDqz4UH6Sz9J22HehGUoRsGccj2NYafSR0gEKaNsxKYIH2BqdIS9Ubd0GyrZdVwyWnpOp7ZWzMJ8gxllYCSOQ==", "requires": { - "dot-prop": "^4.2.0", - "enjoi": "^4.0.0", - "hoek": "^5.0.3", - "joi": "^13.6.0", + "@hapi/hoek": "^9.0.4", + "@hapi/joi": "^17.1.0", + "dot-prop": "^5.2.0", + "enjoi": "^7.0.0", "js-yaml": "^3.11.0", "merge-object-files": "^2.0.0", - "swagger-parser": "^4.1.0" + "swagger-parser": "^9.0.1" }, "dependencies": { - "hoek": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-5.0.4.tgz", - "integrity": "sha512-Alr4ZQgoMlnere5FZJsIyfIjORBqZll5POhDsF4q64dPuJR6rNxXdDxtHSQq8OXRurhmx+PWYEE8bXRROY8h0w==" - }, - "json-schema-ref-parser": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-5.1.3.tgz", - "integrity": "sha512-CpDFlBwz/6la78hZxyB9FECVKGYjIIl3Ms3KLqFj99W7IIb7D00/RDgc++IGB4BBALl0QRhh5m4q5WNSopvLtQ==", - "requires": { - "call-me-maybe": "^1.0.1", - "debug": "^3.1.0", - "js-yaml": "^3.12.0", - "ono": "^4.0.6" - } - }, "swagger-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-4.1.0.tgz", - "integrity": "sha512-XVa4cBnl33enMropuqwM2vJHqsDNZEK5Bl33e8OzbA4V7ZRd7XFxOtPzA59xg4Qaby4r5hJflfEknrmaTmzuIg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-9.0.1.tgz", + "integrity": "sha512-oxOHUaeNetO9ChhTJm2fD+48DbGbLD09ZEOwPOWEqcW8J6zmjWxutXtSuOiXsoRgDWvORYlImbwM21Pn+EiuvQ==", "requires": { - "call-me-maybe": "^1.0.1", - "debug": "^3.1.0", - "json-schema-ref-parser": "^5.0.3", - "ono": "^4.0.5", - "swagger-methods": "^1.0.4", - "swagger-schema-official": "2.0.0-bab6bed", - "z-schema": "^3.19.1" + "@apidevtools/swagger-parser": "9.0.1" } } } }, + "hapi-swagger": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/hapi-swagger/-/hapi-swagger-14.1.0.tgz", + "integrity": "sha512-kmjGFdO3LIgMb3EsfIvwe+RPZmAycRO/rbbFBtC13u5pHUkvTqwinqWgieQ1vKhkivl17lZiiJci/gPzvJ1suQ==", + "requires": { + "@hapi/boom": "^9.1.0", + "@hapi/hoek": "^9.0.2", + "handlebars": "^4.5.3", + "http-status": "^1.0.1", + "json-schema-ref-parser": "^6.1.0", + "swagger-parser": "4.0.2", + "swagger-ui-dist": "^3.22.1" + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -8018,9 +8231,9 @@ "dev": true }, "hasha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", - "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", "dev": true, "requires": { "is-stream": "^2.0.0", @@ -8042,9 +8255,9 @@ } }, "highlight.js": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.1.tgz", - "integrity": "sha512-yR5lWvNz7c85OhVAEAeFhVCc/GV4C30Fjzc/rCP0aCWzc1UUOPUk55dK/qdwTZHBvMZo+eZ2jpk62ndX/xMFlg==" + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.5.0.tgz", + "integrity": "sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw==" }, "highlightjs": { "version": "9.16.2", @@ -8069,6 +8282,15 @@ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" }, + "html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "dev": true, + "requires": { + "whatwg-encoding": "^1.0.5" + } + }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -8076,28 +8298,14 @@ "dev": true }, "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.0.0.tgz", + "integrity": "sha512-numTQtDZMoh78zJpaNdJ9MXb2cv5G3jwUoe3dMQODubZvLoGvTE/Ofp6sHvH8OGKcN/8A47pGLi/k58xHP/Tfw==", + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.4.4", + "entities": "^2.0.0" } }, "http-cache-semantics": { @@ -8137,6 +8345,12 @@ "requires": { "ms": "2.1.2" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, @@ -8151,9 +8365,9 @@ } }, "http-status": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/http-status/-/http-status-1.4.2.tgz", - "integrity": "sha512-mBnIohUwRw9NyXMEMMv8/GANnzEYUj0Y8d3uL01zDWFkxUjYyZ6rgCaAI2zZ1Wb34Oqtbx/nFZolPRDc8Xlm5A==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/http-status/-/http-status-1.5.0.tgz", + "integrity": "sha512-wcGvY31MpFNHIkUcXHHnvrE4IKYlpvitJw5P/1u892gMBAM46muQ+RH7UN1d+Ntnfx5apnOnVY6vcLmrWHOLwg==" }, "http2-client": { "version": "1.3.3", @@ -8178,6 +8392,12 @@ "requires": { "ms": "2.1.2" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, @@ -8189,6 +8409,7 @@ "chalk": "^1.1.1", "commander": "^2.9.0", "debug": "^2.2.0", + "event-stream": "3.3.4", "form-data": "3.0.0", "fs-readfile-promise": "^2.0.1", "fs-writefile-promise": "^1.0.3", @@ -8227,6 +8448,20 @@ "ms": "2.0.0" } }, + "event-stream": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", + "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=", + "requires": { + "duplexer": "~0.1.1", + "from": "~0", + "map-stream": "~0.1.0", + "pause-stream": "0.0.11", + "split": "0.3", + "stream-combiner": "~0.0.4", + "through": "~2.3.1" + } + }, "form-data": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", @@ -8270,6 +8505,12 @@ } } }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, "humanize-ms": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", @@ -8331,9 +8572,9 @@ "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=" }, "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -8369,6 +8610,16 @@ "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", "dev": true }, + "import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -8402,9 +8653,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", - "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==" + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "inquirer": { "version": "7.3.3", @@ -8434,12 +8685,11 @@ "dev": true }, "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -8468,24 +8718,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -8517,6 +8755,27 @@ "es-abstract": "^1.17.0-next.1", "has": "^1.0.3", "side-channel": "^1.0.2" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } } }, "interpret": { @@ -8535,6 +8794,12 @@ "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", "dev": true }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true + }, "ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -8568,20 +8833,23 @@ } }, "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true - }, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, "is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, "is-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.0.tgz", - "integrity": "sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", "dev": true }, "is-binary-path": { @@ -8593,10 +8861,13 @@ } }, "is-boolean-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.0.1.tgz", - "integrity": "sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ==", - "dev": true + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } }, "is-buffer": { "version": "1.1.6", @@ -8604,9 +8875,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==" }, "is-ci": { "version": "2.0.0", @@ -8621,7 +8892,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", - "dev": true, "requires": { "has": "^1.0.3" } @@ -8666,6 +8936,13 @@ } } }, + "is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", + "dev": true, + "optional": true + }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", @@ -8684,6 +8961,12 @@ "number-is-nan": "^1.0.0" } }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -8709,16 +8992,15 @@ "dev": true }, "is-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", - "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", "dev": true }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" }, "is-npm": { "version": "4.0.0", @@ -8756,9 +9038,9 @@ "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" }, "is-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", - "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", "dev": true }, "is-path-inside": { @@ -8781,6 +9063,12 @@ "isobject": "^3.0.1" } }, + "is-potential-custom-element-name": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz", + "integrity": "sha1-DFLlS8yjkbssSUsh6GJtczbG45c=", + "dev": true + }, "is-regex": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", @@ -8803,9 +9091,9 @@ } }, "is-set": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", - "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", "dev": true }, "is-stream": { @@ -8828,13 +9116,14 @@ } }, "is-typed-array": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.3.tgz", - "integrity": "sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.4.tgz", + "integrity": "sha512-ILaRgn4zaSrVNXNGtON6iFNotXW3hAPF3+0fB1usg2jFlWqo5fEDdmJkz0zBfoi7Dgskr8Khi2xZ8cXqZEfXNA==", "dev": true, "requires": { - "available-typed-arrays": "^1.0.0", - "es-abstract": "^1.17.4", + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.0", + "es-abstract": "^1.18.0-next.1", "foreach": "^2.0.5", "has-symbols": "^1.0.1" } @@ -8885,187 +9174,1633 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "isemail": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", - "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "requires": { + "append-transform": "^2.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", + "integrity": "sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==", + "dev": true, "requires": { - "punycode": "2.x.x" + "@jest/core": "^26.6.3", + "import-local": "^3.0.2", + "jest-cli": "^26.6.3" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "jest-cli": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", + "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==", + "dev": true, + "requires": { + "@jest/core": "^26.6.3", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "import-local": "^3.0.2", + "is-ci": "^2.0.0", + "jest-config": "^26.6.3", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "prompts": "^2.0.1", + "yargs": "^15.4.1" + } + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "jest-changed-files": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz", + "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "execa": "^4.0.0", + "throat": "^5.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "jest-config": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz", + "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^26.6.3", + "@jest/types": "^26.6.2", + "babel-jest": "^26.6.3", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.4", + "jest-environment-jsdom": "^26.6.2", + "jest-environment-node": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-jasmine2": "^26.6.3", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "jest-diff": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "jest-docblock": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-26.0.0.tgz", + "integrity": "sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz", + "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "jest-environment-jsdom": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz", + "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2", + "jsdom": "^16.4.0" + } + }, + "jest-environment-node": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", + "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" + } + }, + "jest-get-type": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "dev": true + }, + "jest-haste-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", + "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "jest-jasmine2": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz", + "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^26.6.2", + "is-generator-fn": "^2.0.0", + "jest-each": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2", + "throat": "^5.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "jest-junit": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-12.0.0.tgz", + "integrity": "sha512-+8K35LlboWiPuCnXSyiid7rFdxNlpCWWM20WEYe6IZH6psfUWKZmSpSRQ5tk0C0cBeDsvsnIzcef5mYhyJsbug==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "strip-ansi": "^5.2.0", + "uuid": "^3.3.3", + "xml": "^1.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "jest-leak-detector": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz", + "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==", + "dev": true, + "requires": { + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + } + }, + "jest-matcher-utils": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", + "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "jest-message-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", + "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "jest-mock": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", + "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/node": "*" + } + }, + "jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true + }, + "jest-regex-util": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", + "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", + "dev": true + }, + "jest-resolve": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz", + "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.2", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "jest-resolve-dependencies": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz", + "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-snapshot": "^26.6.2" + } + }, + "jest-runner": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", + "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.7.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-docblock": "^26.0.0", + "jest-haste-map": "^26.6.2", + "jest-leak-detector": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "source-map-support": "^0.5.6", + "throat": "^5.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "jest-runtime": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", + "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/globals": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^0.6.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^15.4.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } } }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "jest-serializer": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", + "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", "dev": true, "requires": { - "append-transform": "^2.0.0" + "@types/node": "*", + "graceful-fs": "^4.2.4" } }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "jest-snapshot": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz", + "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==", "dev": true, "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" + "@babel/types": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.0.0", + "chalk": "^4.0.0", + "expect": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-haste-map": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "natural-compare": "^1.4.0", + "pretty-format": "^26.6.2", + "semver": "^7.3.2" }, "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "jest-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", + "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", "dev": true, "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" }, "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "color-convert": "^2.0.1" } }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "requires": { - "aggregate-error": "^3.0.0" + "fill-range": "^7.0.1" } }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "glob": "^7.1.3" + "color-name": "~1.1.4" } }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "requires": { - "shebang-regex": "^3.0.0" + "to-regex-range": "^5.0.1" } }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", "dev": true, "requires": { - "isexe": "^2.0.0" + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" } } } }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "jest-validate": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", + "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==", "dev": true, "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" + "@jest/types": "^26.6.2", + "camelcase": "^6.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "leven": "^3.1.0", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } } }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "jest-watcher": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz", + "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==", "dev": true, "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^26.6.2", + "string-length": "^4.0.1" }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "ms": "^2.1.1" + "color-convert": "^2.0.1" } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true } } }, - "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" } }, "jgexml": { @@ -9080,20 +10815,15 @@ "dev": true }, "joi": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-13.7.0.tgz", - "integrity": "sha512-xuY5VkHfeOYK3Hdi91ulocfuFopwgbSORmIwzcwHKESQhC7w1kD5jaVSPnqDxS2I8t3RZ9omCKAxNwXN5zG1/Q==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.3.0.tgz", + "integrity": "sha512-Qh5gdU6niuYbUIUV5ejbsMiiFmBdw8Kcp8Buj2JntszCkCfxJ9Cz76OtHxOZMPXrt5810iDIXs+n1nNVoquHgg==", "requires": { - "hoek": "5.x.x", - "isemail": "3.x.x", - "topo": "3.x.x" - }, - "dependencies": { - "hoek": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-5.0.4.tgz", - "integrity": "sha512-Alr4ZQgoMlnere5FZJsIyfIjORBqZll5POhDsF4q64dPuJR6rNxXdDxtHSQq8OXRurhmx+PWYEE8bXRROY8h0w==" - } + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.0", + "@sideway/formula": "^3.0.0", + "@sideway/pinpoint": "^2.0.0" } }, "js-tokens": { @@ -9102,9 +10832,9 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -9115,6 +10845,59 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsdom": { + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.4.0.tgz", + "integrity": "sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w==", + "dev": true, + "requires": { + "abab": "^2.0.3", + "acorn": "^7.1.1", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.2.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.0", + "domexception": "^2.0.1", + "escodegen": "^1.14.1", + "html-encoding-sniffer": "^2.0.1", + "is-potential-custom-element-name": "^1.0.0", + "nwsapi": "^2.2.0", + "parse5": "5.1.1", + "request": "^2.88.2", + "request-promise-native": "^1.0.8", + "saxes": "^5.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^3.0.1", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0", + "ws": "^7.2.3", + "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true + }, + "tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "dev": true, + "requires": { + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -9227,16 +11010,6 @@ "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz", "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==" }, - "jsonschema": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.4.tgz", - "integrity": "sha512-lz1nOH69GbsVHeVgEdvyavc/33oymY1AZwtePMiMj4HZPMbP5OIKK3zT9INMWjwua/V4Z4yq7wSlBbSG+g4AEw==" - }, - "jsonschema-draft4": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/jsonschema-draft4/-/jsonschema-draft4-1.0.0.tgz", - "integrity": "sha1-8K8gBQVPDwrefqIRhhS2ncUS2GU=" - }, "jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -9266,33 +11039,19 @@ } }, "jsx-ast-utils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.1.0.tgz", - "integrity": "sha512-d4/UOjg+mxAWxCiF0c5UTSwyqbchkbqCvK87aBovhnh8GtysTjWmgC63tY0cJx/HzGgm9qnA147jVBdpOiQ2RA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz", + "integrity": "sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q==", "dev": true, "requires": { - "array-includes": "^3.1.1", - "object.assign": "^4.1.1" - }, - "dependencies": { - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - } + "array-includes": "^3.1.2", + "object.assign": "^4.1.2" } }, "just-extend": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", - "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.1.tgz", + "integrity": "sha512-aWgeGFW67BP3e5181Ep1Fv2v8z//iBJfrvyTnq8wG86vEESwmonn1zPBJ0VfmT9CJq2FIT0VsETtrNFm2a+SHA==" }, "jwa": { "version": "1.4.1", @@ -9425,6 +11184,42 @@ "figgy-pudding": "^3.5.1", "find-up": "^3.0.0", "ini": "^1.3.5" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } } }, "liftoff": { @@ -9442,6 +11237,12 @@ "resolve": "^1.1.7" } }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, "linkify-it": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", @@ -9462,12 +11263,11 @@ } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^4.1.0" } }, "lodash": { @@ -9592,12 +11392,11 @@ "dev": true }, "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "yallist": "^3.0.2" } }, "make-dir": { @@ -9618,9 +11417,9 @@ } }, "make-fetch-happen": { - "version": "8.0.12", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.12.tgz", - "integrity": "sha512-cBD7yM72ltWEV+xlLlbimnh5qHwr+thAb/cZLiaZhicVVPVN63BikBvL5OR68+8+z2fvBOgck628vGJ2ulgF6g==", + "version": "8.0.13", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-8.0.13.tgz", + "integrity": "sha512-rQ5NijwwdU8tIaBrpTtSVrNCcAJfyDRcKBC76vOQlyJX588/88+TE+UpjWl4BgG7gCkp29wER7xcRqkeg+x64Q==", "dev": true, "requires": { "agentkeepalive": "^4.1.3", @@ -9674,6 +11473,15 @@ "kind-of": "^6.0.2" } }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.x" + } + }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -9784,6 +11592,18 @@ "is-plain-obj": "^1.1" } }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -9815,16 +11635,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" }, "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", "requires": { - "mime-db": "1.44.0" + "mime-db": "1.45.0" } }, "mimic-fn": { @@ -9863,13 +11683,6 @@ "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" - }, - "dependencies": { - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } } }, "minipass-collect": { @@ -9899,9 +11712,9 @@ } }, "minipass-fetch": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.3.2.tgz", - "integrity": "sha512-/i4fX1ss+Dtwyk++OsAI6SEV+eE1dvI6W+0hORdjfruQ7VD5uYTetJIHcEMjWiEiszWjn2aAtP1CB/Q4KfeoYA==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.3.3.tgz", + "integrity": "sha512-akCrLDWfbdAWkMLBxJEeWTdNsjML+dt5YgOI4gJ53vuO0vrmYQkUPxa6j6V65s9CcePIr2SSWqjT2EcrNseryQ==", "dev": true, "requires": { "encoding": "^0.1.12", @@ -10103,9 +11916,9 @@ "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" }, "moment-timezone": { - "version": "0.5.31", - "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.31.tgz", - "integrity": "sha512-+GgHNg8xRhMXfEbv81iDtrVeTcWt0kWmTEY1XQK14dICTXnWJnT0dxdlPspwqF3keKMVPXwayEsk1DI0AA/jdA==", + "version": "0.5.32", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.32.tgz", + "integrity": "sha512-Z8QNyuQHQAmWucp8Knmgei8YNo28aLjJq6Ma+jy1ZSpSk5nyfRT8xgUbSQvD2+2UajISfenndwvFuH3NGS+nvA==", "requires": { "moment": ">= 2.9.0" } @@ -10151,6 +11964,16 @@ "safe-buffer": "^5.1.2", "saslprep": "^1.0.0" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "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==" } } }, @@ -10180,18 +12003,23 @@ "version": "3.5.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "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==" } } }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "mustache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.1.tgz", - "integrity": "sha512-yL5VE97+OXn4+Er3THSmTdCFCtx5hHWzrolvH+JObZnUYwuaG7XV+Ch4fR2cIrcYI0tFHxS7iyFYl14bW8y2sA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.1.0.tgz", + "integrity": "sha512-0FsgP/WVq4mKyjolIyX+Z9Bd+3WS8GOwoUTyKXT5cTYMGeauNTi2HPCwERqseC1IHAy0Z7MDZnJBfjabd4O8GQ==" }, "mute-stream": { "version": "0.0.8", @@ -10208,12 +12036,46 @@ "readable-stream": "2.3.7", "safe-buffer": "5.1.2", "sqlstring": "2.3.1" + }, + "dependencies": { + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "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" + } + }, + "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==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==" }, "nanomatch": { "version": "1.2.13", @@ -10240,9 +12102,9 @@ "dev": true }, "needle": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz", - "integrity": "sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz", + "integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==", "requires": { "debug": "^3.2.6", "iconv-lite": "^0.4.4", @@ -10250,9 +12112,9 @@ }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "requires": { "ms": "^2.1.1" } @@ -10395,9 +12257,9 @@ } }, "tar": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.5.tgz", - "integrity": "sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", + "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", "dev": true, "requires": { "chownr": "^2.0.0", @@ -10425,6 +12287,89 @@ } } }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-notifier": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.1.tgz", + "integrity": "sha512-BvEXF+UmsnAfYfoapKM9nGxnP+Wn7P91YfXmrKnfcYCx6VBeoN5Ez5Ogck6I8Bi5k4RlpqRYaw75pAwzX9OphA==", + "dev": true, + "optional": true, + "requires": { + "growly": "^1.3.0", + "is-wsl": "^2.2.0", + "semver": "^7.3.2", + "shellwords": "^0.1.1", + "uuid": "^8.3.0", + "which": "^2.0.2" + }, + "dependencies": { + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "optional": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "optional": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "optional": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "optional": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "optional": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "optional": true + } + } + }, "node-pre-gyp": { "version": "0.15.0", "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.15.0.tgz", @@ -10466,19 +12411,12 @@ "integrity": "sha1-271K8SE04uY1wkXvk//Pb2BnOl0=", "requires": { "es6-promise": "^3.2.1" - }, - "dependencies": { - "es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM=" - } } }, "nodemon": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.6.tgz", - "integrity": "sha512-4I3YDSKXg6ltYpcnZeHompqac4E6JeAMpGm8tJnB9Y3T0ehasLa4139dJOcCrB93HHrUMsCrKtoAlXTqT5n4AQ==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.7.tgz", + "integrity": "sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA==", "dev": true, "requires": { "chokidar": "^3.2.2", @@ -10564,6 +12502,24 @@ "spawn-shell": "^2.1.0", "yargs-parser": "^18.1.3", "yargs-unparser": "^1.6.3" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } } }, "npm-bundled": { @@ -10575,29 +12531,31 @@ } }, "npm-check-updates": { - "version": "10.2.3", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-10.2.3.tgz", - "integrity": "sha512-FOn6jgtaSuX5UQRd2mZF50tzY3LWD+jupWwEEnl2EPKyJWTUtvLIipKsBITXniPjSONiZl5Nu1SUoKV7s1PH0A==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-11.0.2.tgz", + "integrity": "sha512-Ck+9Yq6B/N50y6lmGN0bLX1/TEseb/0xTWSAbfia1NVDH2uAzcAhwAgJbkOTqQuM+O6KC80liXTk8tC1w2PKOA==", "dev": true, "requires": { "chalk": "^4.1.0", "cint": "^8.2.1", "cli-table": "^0.3.4", - "commander": "^6.2.0", + "commander": "^6.2.1", "find-up": "5.0.0", "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", + "globby": "^11.0.2", "hosted-git-info": "^3.0.7", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", "lodash": "^4.17.20", + "mem": "^8.0.0", "p-map": "^4.0.0", - "pacote": "^11.1.13", + "pacote": "^11.2.3", "parse-github-url": "^1.0.2", "progress": "^2.0.3", "prompts": "^2.4.0", - "rc-config-loader": "^3.0.0", + "rc-config-loader": "^4.0.0", "remote-git-tags": "^3.0.0", "rimraf": "^3.0.2", "semver": "^7.3.4", @@ -10615,6 +12573,12 @@ "color-convert": "^2.0.1" } }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -10641,9 +12605,9 @@ "dev": true }, "commander": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", - "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true }, "find-up": { @@ -10656,6 +12620,20 @@ "path-exists": "^4.0.0" } }, + "globby": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", + "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, "hosted-git-info": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz", @@ -10665,6 +12643,12 @@ "lru-cache": "^6.0.0" } }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, "is-npm": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", @@ -10689,6 +12673,22 @@ "yallist": "^4.0.0" } }, + "mem": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-8.0.0.tgz", + "integrity": "sha512-qrcJOe6uD+EW8Wrci1Vdiua/15Xw3n/QnaNXE7varnB6InxSk7nu3/i5jfy3S6kWxr8WYJ6R1o0afMUtvorTsA==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.3", + "mimic-fn": "^3.1.0" + } + }, + "mimic-fn": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", + "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", + "dev": true + }, "p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -10707,12 +12707,6 @@ "p-limit": "^3.0.2" } }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -10982,11 +12976,11 @@ } }, "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", "requires": { - "boolbase": "~1.0.0" + "boolbase": "^1.0.0" } }, "number-is-nan": { @@ -10994,6 +12988,12 @@ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, + "nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "dev": true + }, "nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", @@ -11036,15 +13036,20 @@ "dev": true }, "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -11071,46 +13076,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, "p-map": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", @@ -11120,12 +13091,6 @@ "aggregate-error": "^3.0.0" } }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -11173,9 +13138,9 @@ } }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs": { @@ -11196,6 +13161,16 @@ "y18n": "^4.0.0", "yargs-parser": "^18.1.2" } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, @@ -11265,11 +13240,6 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -11321,11 +13291,6 @@ "y18n": "^5.0.5", "yargs-parser": "^20.2.2" } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" } } }, @@ -11413,18 +13378,18 @@ } }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" }, "object-is": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", - "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.4.tgz", + "integrity": "sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg==", "dev": true, "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "object-keys": { @@ -11441,14 +13406,14 @@ } }, "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" } }, "object.defaults": { @@ -11472,46 +13437,6 @@ "define-properties": "^1.1.3", "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - } } }, "object.fromentries": { @@ -11524,46 +13449,6 @@ "define-properties": "^1.1.3", "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - } } }, "object.map": { @@ -11593,46 +13478,6 @@ "define-properties": "^1.1.3", "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - } } }, "oer-utils": { @@ -11667,9 +13512,9 @@ "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=" }, "onetime": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.1.tgz", - "integrity": "sha512-ZpZpjcJeugQfWsfyQlshVoowIIQ1qBGSVll4rfDq6JJVO//fesjoX808hXWfBjY+ROZgpKDI5TRSRBSoJiZ8eg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { "mimic-fn": "^2.1.0" @@ -11684,32 +13529,82 @@ } }, "openapi-backend": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/openapi-backend/-/openapi-backend-3.5.1.tgz", - "integrity": "sha512-aVScBkutF280uC4OouZkUThy58Ot3dk2K1HIll9zNsi1If0paU5enwTZKUkLQybSWkvq1MATddz5uz7J4h/sOg==", + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/openapi-backend/-/openapi-backend-3.6.3.tgz", + "integrity": "sha512-o2/qroZKAC1t5CSiSUDHlFicBibQiP4Z2unkqn+OoE68B0H3WpYdykhb7hJQTROWYR72gQrJDcPdBFKiI9TqRg==", "requires": { "ajv": "^6.10.0", "bath-es5": "^3.0.3", "cookie": "^0.4.0", "lodash": "^4.17.15", "mock-json-schema": "^1.0.7", - "openapi-schema-validation": "^0.4.2", - "openapi-types": "^1.3.4", + "openapi-schema-validator": "^7.0.1", + "openapi-types": "^7.0.1", "qs": "^6.9.3", - "swagger-parser": "^9.0.1" + "swagger-parser": "^10.0.2" }, "dependencies": { + "@apidevtools/json-schema-ref-parser": { + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", + "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", + "requires": { + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "js-yaml": "^3.13.1" + } + }, + "@apidevtools/swagger-parser": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@apidevtools/swagger-parser/-/swagger-parser-10.0.2.tgz", + "integrity": "sha512-JFxcEyp8RlNHgBCE98nwuTkZT6eNFPc1aosWV6wPcQph72TSEEu1k3baJD4/x1qznU+JiDdz8F5pTwabZh+Dhg==", + "requires": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@apidevtools/openapi-schemas": "^2.0.4", + "@apidevtools/swagger-methods": "^3.0.2", + "@jsdevtools/ono": "^7.1.3", + "call-me-maybe": "^1.0.1", + "z-schema": "^4.2.3" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "optional": true + }, + "openapi-types": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-7.2.3.tgz", + "integrity": "sha512-olbaNxz12R27+mTyJ/ZAFEfUruauHH27AkeQHDHRq5AF0LdNkK1SSV7EourXQDK+4aX7dv2HtyirAGK06WMAsA==" + }, "qs": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", - "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==" + "version": "6.9.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", + "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==" }, "swagger-parser": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-9.0.1.tgz", - "integrity": "sha512-oxOHUaeNetO9ChhTJm2fD+48DbGbLD09ZEOwPOWEqcW8J6zmjWxutXtSuOiXsoRgDWvORYlImbwM21Pn+EiuvQ==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/swagger-parser/-/swagger-parser-10.0.2.tgz", + "integrity": "sha512-9jHkHM+QXyLGFLk1DkXBwV+4HyNm0Za3b8/zk/+mjr8jgOSiqm3FOTHBSDsBjtn9scdL+8eWcHdupp2NLM8tDw==", "requires": { - "@apidevtools/swagger-parser": "9.0.1" + "@apidevtools/swagger-parser": "10.0.2" + } + }, + "validator": { + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-12.2.0.tgz", + "integrity": "sha512-jJfE/DW6tIK1Ek8nCfNFqt8Wb3nzMoAbocBF6/Icgg1ZFSBpObdnwVY2jQj6qUqzhx5jc71fpvBWyLGO7Xl+nQ==" + }, + "z-schema": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-4.2.3.tgz", + "integrity": "sha512-zkvK/9TC6p38IwcrbnT3ul9in1UX4cm1y/VZSs4GHKIiDCrlafc+YQBgQBUdDXLAoZHf2qvQ7gJJOo6yT1LH6A==", + "requires": { + "commander": "^2.7.1", + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.5.0", + "validator": "^12.0.0" } } } @@ -11722,31 +13617,21 @@ "json-pointer": "^0.6.0" } }, - "openapi-schema-validation": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/openapi-schema-validation/-/openapi-schema-validation-0.4.2.tgz", - "integrity": "sha512-K8LqLpkUf2S04p2Nphq9L+3bGFh/kJypxIG2NVGKX0ffzT4NQI9HirhiY6Iurfej9lCu7y4Ndm4tv+lm86Ck7w==", - "requires": { - "jsonschema": "1.2.4", - "jsonschema-draft4": "^1.0.0", - "swagger-schema-official": "2.0.0-bab6bed" - } - }, "openapi-schema-validator": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/openapi-schema-validator/-/openapi-schema-validator-7.0.1.tgz", - "integrity": "sha512-P/dmF14xWbyaFVcoS1Fs2tUP4AhJO+eEnZV+jbApeo3569/Z2fiki6Mb6Rs7cfi0ewNnV4L4HiYH+HPZaKWnjQ==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/openapi-schema-validator/-/openapi-schema-validator-7.2.3.tgz", + "integrity": "sha512-XT8NM5e/zBBa/cydTS1IeYkCPzJp9oixvt9Y1lEx+2gsCTOooNxw9x/KEivtWMSokne7X1aR+VtsYHQtNNOSyA==", "requires": { "ajv": "^6.5.2", "lodash.merge": "^4.6.1", - "openapi-types": "^7.0.1", + "openapi-types": "^7.2.3", "swagger-schema-official": "2.0.0-bab6bed" }, "dependencies": { "openapi-types": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-7.0.1.tgz", - "integrity": "sha512-6pi4/Fw+JIW1HHda2Ij7LRJ5QJ8f6YzaXnsRA6m44BJz8nLq/j5gVFzPBKJo+uOFhAeHqZC/3uzhTpYPga3Q/A==" + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-7.2.3.tgz", + "integrity": "sha512-olbaNxz12R27+mTyJ/ZAFEfUruauHH27AkeQHDHRq5AF0LdNkK1SSV7EourXQDK+4aX7dv2HtyirAGK06WMAsA==" } } }, @@ -11826,6 +13711,12 @@ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" }, + "p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -11845,11 +13736,11 @@ } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "requires": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" } }, "p-map": { @@ -11899,9 +13790,9 @@ } }, "pacote": { - "version": "11.1.13", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-11.1.13.tgz", - "integrity": "sha512-oJ7Bg7p3izrIMhZPHCCHmMHQl+xb+pKBXL5ZYeM2oCZrw6sBRSx7f8l7F+95V2qA0BP3c1cNaaBmUNkbo6Hn9w==", + "version": "11.2.3", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-11.2.3.tgz", + "integrity": "sha512-Jphxyk1EjGyLzNwa+MkbcQUQeTIqlKcIoPq0t9ekR9ZxsTGjzhRjz/cOoL9PTVkqAW1FH7qBoVbYL4FqQGNNJg==", "dev": true, "requires": { "@npmcli/git": "^2.0.1", @@ -11922,7 +13813,7 @@ "read-package-json-fast": "^1.1.3", "rimraf": "^3.0.2", "ssri": "^8.0.0", - "tar": "^6.0.1" + "tar": "^6.1.0" }, "dependencies": { "chownr": { @@ -11987,9 +13878,9 @@ } }, "tar": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.5.tgz", - "integrity": "sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", + "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", "dev": true, "requires": { "chownr": "^2.0.0", @@ -12057,11 +13948,16 @@ "integrity": "sha512-hb50xDyEo8boMtyzB1IdVE4KcTNVbIirk/ZqC8na1irOf/70DyZS30y1FIIAUe9jyHJk9s2QoZ4aBNHR9NXHsg==" }, "parse5": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", - "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", "requires": { - "@types/node": "*" + "parse5": "^6.0.1" } }, "parseurl": { @@ -12080,9 +13976,9 @@ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" }, "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "path-is-absolute": { "version": "1.0.1", @@ -12135,6 +14031,12 @@ "pify": "^3.0.0" } }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, "pause-stream": { "version": "0.0.11", "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", @@ -12181,6 +14083,15 @@ "pinkie": "^2.0.0" } }, + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, "pkg-conf": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", @@ -12191,6 +14102,15 @@ "load-json-file": "^5.2.0" }, "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, "load-json-file": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", @@ -12204,6 +14124,31 @@ "type-fest": "^0.3.0" } }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -12219,42 +14164,6 @@ "dev": true, "requires": { "find-up": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } } }, "posix-character-classes": { @@ -12314,6 +14223,16 @@ "which": "^1.2.9" } }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, "which": { "version": "1.2.14", "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", @@ -12322,6 +14241,12 @@ "requires": { "isexe": "^2.0.0" } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } }, @@ -12337,6 +14262,50 @@ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, + "pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -12408,6 +14377,14 @@ "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.8.1" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + } } }, "protobufjs": { @@ -12460,7 +14437,8 @@ "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true }, "psl": { "version": "1.8.0", @@ -12568,17 +14546,23 @@ } }, "rc-config-loader": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-3.0.0.tgz", - "integrity": "sha512-bwfUSB37TWkHfP+PPjb/x8BUjChFmmBK44JMfVnU7paisWqZl/o5k7ttCH+EQLnrbn2Aq8Fo1LAsyUiz+WF4CQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rc-config-loader/-/rc-config-loader-4.0.0.tgz", + "integrity": "sha512-//LRTblJEcqbmmro1GCmZ39qZXD+JqzuD8Y5/IZU3Dhp3A1Yr0Xn68ks8MQ6qKfKvYCWDveUmRDKDA40c+sCXw==", "dev": true, "requires": { "debug": "^4.1.1", - "js-yaml": "^3.12.0", - "json5": "^2.1.1", + "js-yaml": "^4.0.0", + "json5": "^2.1.2", "require-from-string": "^2.0.2" }, "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -12587,13 +14571,28 @@ "requires": { "ms": "2.1.2" } + }, + "js-yaml": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", "dev": true }, "read": { @@ -12626,119 +14625,64 @@ } }, "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" }, "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", + "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", "dev": true, "requires": { - "error-ex": "^1.2.0" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" } }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, "requires": { - "pify": "^2.0.0" + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } } }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } } } }, "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "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" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } }, "readdir-scoped-modules": { @@ -12801,6 +14745,27 @@ "requires": { "define-properties": "^1.1.3", "es-abstract": "^1.17.0-next.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } } }, "regexpp": { @@ -12842,6 +14807,12 @@ "integrity": "sha512-C9hAO4eoEsX+OXA4rla66pXZQ+TLQ8T9dttgQj18yuKlPMTVkIkdYXvlMC55IuUsIkV6DpmQYi10JKFLaU+l7w==", "dev": true }, + "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", @@ -12879,19 +14850,12 @@ "uuid": "^3.3.2" } }, - "request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", - "requires": { - "lodash": "^4.17.19" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" - } + "request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "requires": { + "lodash": "^4.17.19" } }, "request-promise-native": { @@ -12940,13 +14904,31 @@ } }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "requires": { + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, "resolve-dir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", @@ -13004,6 +14986,12 @@ "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=" }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rewire": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/rewire/-/rewire-5.0.0.tgz", @@ -13019,15 +15007,27 @@ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "eslint": { "version": "6.8.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", @@ -13082,6 +15082,12 @@ "eslint-visitor-keys": "^1.1.0" } }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, "espree": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", @@ -13093,6 +15099,32 @@ "eslint-visitor-keys": "^1.1.0" } }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, "glob-parent": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", @@ -13102,6 +15134,12 @@ "is-glob": "^4.0.1" } }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -13112,6 +15150,12 @@ "type-check": "~0.3.2" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "optionator": { "version": "0.8.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", @@ -13138,12 +15182,43 @@ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -13159,6 +15234,18 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + } + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -13186,25 +15273,37 @@ "glob": "^7.1.3" } }, + "rsvp": { + "version": "4.8.5", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", + "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", + "dev": true + }, "run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "dev": true }, + "run-parallel": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", + "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", + "dev": true + }, "rxjs": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz", - "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==", + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", "dev": true, "requires": { "tslib": "^1.9.0" } }, "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==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safe-regex": { "version": "1.1.0", @@ -13219,6 +15318,44 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "sane": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", + "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", + "dev": true, + "requires": { + "@cnakazawa/watch": "^1.0.3", + "anymatch": "^2.0.0", + "capture-exit": "^2.0.0", + "exec-sh": "^0.3.2", + "execa": "^1.0.0", + "fb-watchman": "^2.0.0", + "micromatch": "^3.1.4", + "minimist": "^1.1.1", + "walker": "~1.0.5" + }, + "dependencies": { + "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" + } + }, + "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" + } + } + } + }, "sanitize-html": { "version": "1.27.5", "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.27.5.tgz", @@ -13230,31 +15367,6 @@ "postcss": "^7.0.27" }, "dependencies": { - "dom-serializer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz", - "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==", - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "entities": "^2.0.0" - }, - "dependencies": { - "domhandler": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", - "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", - "requires": { - "domelementtype": "^2.1.0" - } - } - } - }, - "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==" - }, "domhandler": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz", @@ -13263,31 +15375,6 @@ "domelementtype": "^2.0.1" } }, - "domutils": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.4.4.tgz", - "integrity": "sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==", - "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0" - }, - "dependencies": { - "domhandler": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", - "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", - "requires": { - "domelementtype": "^2.1.0" - } - } - } - }, - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" - }, "htmlparser2": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz", @@ -13315,6 +15402,15 @@ "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, + "saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "requires": { + "xmlchars": "^2.2.0" + } + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -13453,6 +15549,13 @@ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==" }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true, + "optional": true + }, "shins": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/shins/-/shins-2.6.0.tgz", @@ -13573,13 +15676,14 @@ "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==" }, "side-channel": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.2.tgz", - "integrity": "sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, "requires": { - "es-abstract": "^1.17.0-next.1", - "object-inspect": "^1.7.0" + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" } }, "sift": { @@ -13601,34 +15705,23 @@ } }, "sinon": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.1.tgz", - "integrity": "sha512-naPfsamB5KEE1aiioaoqJ6MEhdUs/2vtI5w1hPAXX/UwvoPjXcwh1m5HiKx0HGgKR8lQSoFIgY5jM6KK8VrS9w==", + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", + "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.1", "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.2.0", + "@sinonjs/samsam": "^5.3.1", "diff": "^4.0.2", "nise": "^4.0.4", "supports-color": "^7.1.0" }, "dependencies": { - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, "@sinonjs/samsam": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.0.tgz", - "integrity": "sha512-hXpcfx3aq+ETVBwPlRFICld5EnrkexXuXDwqUNhDdr5L8VjvMeSRwyOa0qL7XFmR+jVWR4rUZtnxlG7RX72sBg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", "dev": true, "requires": { "@sinonjs/commons": "^1.6.0", @@ -13657,21 +15750,51 @@ "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "dev": true }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true } } @@ -13826,6 +15949,12 @@ "requires": { "ms": "2.1.2" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, @@ -13846,6 +15975,24 @@ "urix": "^0.1.0" } }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", @@ -13945,9 +16092,9 @@ } }, "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==" + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==" }, "split": { "version": "1.0.1", @@ -14028,6 +16175,23 @@ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, + "stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, "standard": { "version": "16.0.3", "resolved": "https://registry.npmjs.org/standard/-/standard-16.0.3.tgz", @@ -14059,6 +16223,12 @@ "color-convert": "^2.0.1" } }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -14104,6 +16274,12 @@ "ms": "2.1.2" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "eslint": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.13.0.tgz", @@ -14149,39 +16325,32 @@ "v8-compile-cache": "^2.0.3" } }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "dev": true, "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "flat-cache": "^2.0.1" } }, - "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "dev": true - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" } }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, "glob-parent": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", @@ -14191,6 +16360,12 @@ "is-glob": "^4.0.1" } }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -14200,12 +16375,27 @@ "yallist": "^4.0.0" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "semver": { "version": "7.3.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", @@ -14230,6 +16420,71 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + } + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "strip-ansi": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", @@ -14245,6 +16500,18 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -14317,6 +16584,33 @@ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" }, + "string-length": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.1.tgz", + "integrity": "sha512-PKyXUd0LK0ePjSOnWn34V2uD6acUWev9uy0Ft05k0E8xRW+SKcA0F7eMr7h5xlzfn+4O3N+55rduYyet3Jk+jw==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -14340,102 +16634,53 @@ "internal-slot": "^1.0.2", "regexp.prototype.flags": "^1.3.0", "side-channel": "^1.0.3" - }, - "dependencies": { - "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "side-channel": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.3.tgz", - "integrity": "sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g==", - "dev": true, - "requires": { - "es-abstract": "^1.18.0-next.0", - "object-inspect": "^1.8.0" - } - } } }, "string.prototype.padend": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", - "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.1.tgz", + "integrity": "sha512-eCzTASPnoCr5Ht+Vn1YXgm8SB015hHKgEIMu9Nr9bQmLhRBxKRfmzSj/IQsxDFc8JInJDDFA0qXwK+xxI7wDkg==", "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1" } }, "string.prototype.trim": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.1.tgz", - "integrity": "sha512-MjGFEeqixw47dAMFMtgUro/I0+wNqZB5GKXGt1fFr24u3TzDXCPu7J9Buppzoe3r/LqkSDLDDJzE15RGWDGAVw==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.3.tgz", + "integrity": "sha512-16IL9pIBA5asNOSukPfxX2W68BaBvxyiRK16H3RA/lWW9BDosh+w7f+LhomPHpXJ82QEe7w7/rY/S1CV97raLg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1" + "es-abstract": "^1.18.0-next.1" } }, "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", + "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", + "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" } }, "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "~5.2.0" } }, "stringify-object": { @@ -14466,19 +16711,128 @@ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" }, + "superagent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-6.1.0.tgz", + "integrity": "sha512-OUDHEssirmplo3F+1HWKUrUjvnQuA+nZI6i/JJBdXb5eq9IyEQwPyPpqND+SSsxf6TygpBEkUjISVRN4/VOpeg==", + "dev": true, + "requires": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.2", + "debug": "^4.1.1", + "fast-safe-stringify": "^2.0.7", + "form-data": "^3.0.0", + "formidable": "^1.2.2", + "methods": "^1.1.2", + "mime": "^2.4.6", + "qs": "^6.9.4", + "readable-stream": "^3.6.0", + "semver": "^7.3.2" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "form-data": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "mime": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.0.tgz", + "integrity": "sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "qs": { + "version": "6.9.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", + "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "supertest": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.1.1.tgz", + "integrity": "sha512-3WDAWfqdNifCURjGUHZFv3u5nMg5tFtFRCTJOcSZXdlYZ0gqVF3UMhA7IJDP8nDXnR3gocbQ6s0bpiPnsoFeQw==", + "dev": true, + "requires": { + "methods": "^1.1.2", + "superagent": "^6.1.0" + } + }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "requires": { "has-flag": "^4.0.0" } }, + "supports-hyperlinks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz", + "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + } + }, "swagger-methods": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/swagger-methods/-/swagger-methods-1.0.8.tgz", @@ -14517,9 +16871,9 @@ "integrity": "sha1-cAcEaNbSl3ylI3suUZyn0Gouo/0=" }, "swagger-ui-dist": { - "version": "3.31.1", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.31.1.tgz", - "integrity": "sha512-+IuIxXX8grZcDVLaC12WCGy62iHJ2v8kTptU4H4EgY/ue6tKeMu/jzIAs+pLFOuYwfG4+VQ+CrC9UeHR9oNKBw==" + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.39.0.tgz", + "integrity": "sha512-mNCdhxMvYH0E96ebDX5LL3Yj8zMqC/HFAN5YDjwYxuetEewZ6onBrBBSJsWcl6vCxbEbtS2qBiy9OtBY+YyndQ==" }, "swagger2openapi": { "version": "6.2.3", @@ -14552,6 +16906,11 @@ "color-convert": "^2.0.1" } }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" + }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -14575,46 +16934,11 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "requires": { - "p-limit": "^2.2.0" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" - }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -14665,6 +16989,15 @@ "y18n": "^4.0.0", "yargs-parser": "^18.1.2" } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, @@ -14681,6 +17014,12 @@ "swagger-parser": "^3.4.1" }, "dependencies": { + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, "json-schema-ref-parser": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-1.4.1.tgz", @@ -14741,48 +17080,72 @@ } } }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" }, "dependencies": { + "ajv": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz", + "integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" } } } @@ -14837,6 +17200,36 @@ "xtend": "~4.0.0" }, "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": 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" + } + }, + "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==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, "tap-parser": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-1.2.2.tgz", @@ -14868,47 +17261,48 @@ } }, "tape": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.0.1.tgz", - "integrity": "sha512-wVsOl2shKPcjdJdc8a+PwacvrOdJZJ57cLUXlxW4TQ2R6aihXwG0m0bKm4mA4wjtQNTaLMCrYNEb4f9fjHKUYQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/tape/-/tape-5.1.1.tgz", + "integrity": "sha512-ujhT+ZJPqSGY9Le02mIGBnyWo7Ks05FEGS9PnlqECr3sM3KyV4CSCXAvSBJKMN+t+aZYLKEFUEo0l4wFJMhppQ==", "dev": true, "requires": { - "deep-equal": "^2.0.3", + "call-bind": "^1.0.0", + "deep-equal": "^2.0.5", "defined": "^1.0.0", "dotignore": "^0.1.2", "for-each": "^0.3.3", - "function-bind": "^1.1.1", "glob": "^7.1.6", "has": "^1.0.3", "inherits": "^2.0.4", - "is-regex": "^1.0.5", + "is-regex": "^1.1.1", "minimist": "^1.2.5", - "object-inspect": "^1.7.0", - "object-is": "^1.1.2", - "object.assign": "^4.1.0", - "resolve": "^1.17.0", + "object-inspect": "^1.9.0", + "object-is": "^1.1.4", + "object.assign": "^4.1.2", + "resolve": "^1.19.0", "resumer": "^0.0.0", - "string.prototype.trim": "^1.2.1", + "string.prototype.trim": "^1.2.3", "through": "^2.3.8" }, "dependencies": { "deep-equal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.3.tgz", - "integrity": "sha512-Spqdl4H+ky45I9ByyJtXteOm9CaIrPmnIPmOhrkKGNYWeDgCvJ8jNYVCTjChxW4FqGuZnLHADc8EKRMX6+CgvA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.5.tgz", + "integrity": "sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==", "dev": true, "requires": { - "es-abstract": "^1.17.5", - "es-get-iterator": "^1.1.0", + "call-bind": "^1.0.0", + "es-get-iterator": "^1.1.1", + "get-intrinsic": "^1.0.1", "is-arguments": "^1.0.4", "is-date-object": "^1.0.2", - "is-regex": "^1.0.5", + "is-regex": "^1.1.1", "isarray": "^2.0.5", - "object-is": "^1.1.2", + "object-is": "^1.1.4", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.2", "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.2", + "side-channel": "^1.0.3", "which-boxed-primitive": "^1.0.1", "which-collection": "^1.0.1", "which-typed-array": "^1.1.2" @@ -14971,13 +17365,6 @@ "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", "yallist": "^3.0.3" - }, - "dependencies": { - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" - } } }, "tarn": { @@ -14999,6 +17386,16 @@ "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", "dev": true }, + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, "test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -15021,6 +17418,12 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, + "throat": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", + "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -15081,6 +17484,12 @@ "os-tmpdir": "~1.0.2" } }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -15136,14 +17545,6 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, - "topo": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/topo/-/topo-3.0.3.tgz", - "integrity": "sha512-IgpPtvD4kjrJ7CRA3ov2FhWQADwv+Tdqbsf1ZnPUSAtCJ9e1Z44MmoSGDXGk4IppoZA7jd/QRkNddlLJWlUZsQ==", - "requires": { - "hoek": "6.x.x" - } - }, "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", @@ -15284,9 +17685,9 @@ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" }, "uglify-js": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.1.tgz", - "integrity": "sha512-RjxApKkrPJB6kjJxQS3iZlf///REXWYxYJxO/MpmlQzVkDWVI3PSnCBWezMecmTU/TRkNxrl8bmsfFQCp+LO+Q==", + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.4.tgz", + "integrity": "sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==", "optional": true }, "uglify-to-browserify": { @@ -15463,9 +17864,9 @@ } }, "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "requires": { "punycode": "^2.1.0" } @@ -15515,11 +17916,30 @@ "integrity": "sha512-TzsQS8sN1B2m9WojyNp0X/3JL8J2RScnrAJnooNPL6lq3lA02/XdoWysyUgI6rAif0DzkkWk51N6OggujPy2RA==" }, "v8-compile-cache": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", - "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", "dev": true }, + "v8-to-istanbul": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz", + "integrity": "sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "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 + } + } + }, "v8flags": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", @@ -15566,6 +17986,38 @@ "extsprintf": "^1.2.0" } }, + "vm": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/vm/-/vm-0.1.0.tgz", + "integrity": "sha1-AGDUhei4mFiUbECwGmugeUXbcKg=" + }, + "w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dev": true, + "requires": { + "browser-process-hrtime": "^1.0.0" + } + }, + "w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dev": true, + "requires": { + "xml-name-validator": "^3.0.0" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.x" + } + }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -15576,9 +18028,18 @@ } }, "webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==" + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" + }, + "whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "requires": { + "iconv-lite": "0.4.24" + } }, "whatwg-mimetype": { "version": "2.3.0", @@ -15586,13 +18047,13 @@ "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" }, "whatwg-url": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.1.0.tgz", - "integrity": "sha512-vEIkwNi9Hqt4TV9RdnaBPNt+E2Sgmo3gePebCRgZ1R7g6d23+53zCTnuB0amKI4AXq6VM8jj2DUAa0S1vjJxkw==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.4.0.tgz", + "integrity": "sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw==", "requires": { "lodash.sortby": "^4.7.0", "tr46": "^2.0.2", - "webidl-conversions": "^5.0.0" + "webidl-conversions": "^6.1.0" } }, "which": { @@ -15604,16 +18065,16 @@ } }, "which-boxed-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.1.tgz", - "integrity": "sha512-7BT4TwISdDGBgaemWU0N0OU7FeAEJ9Oo2P1PHRm/FCWoEi2VLWC9b6xvxAA3C/NMpxg3HXVgi0sMmGbNUbNepQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, "requires": { - "is-bigint": "^1.0.0", - "is-boolean-object": "^1.0.0", - "is-number-object": "^1.0.3", - "is-string": "^1.0.4", - "is-symbol": "^1.0.2" + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" } }, "which-collection": { @@ -15634,13 +18095,14 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "which-typed-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.2.tgz", - "integrity": "sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", + "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", "dev": true, "requires": { "available-typed-arrays": "^1.0.2", - "es-abstract": "^1.17.5", + "call-bind": "^1.0.0", + "es-abstract": "^1.18.0-next.1", "foreach": "^2.0.5", "function-bind": "^1.1.1", "has-symbols": "^1.0.1", @@ -15690,6 +18152,14 @@ "wrap-ansi": "^2.0.0" } }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -15713,6 +18183,15 @@ "invert-kv": "^2.0.0" } }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -15723,6 +18202,19 @@ "mem": "^4.0.0" } }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", @@ -15798,12 +18290,6 @@ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -15860,16 +18346,6 @@ "requires": { "lodash": "^4.17.14" } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } } } }, @@ -15880,6 +18356,35 @@ "requires": { "readable-stream": "^2.3.7", "triple-beam": "^1.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "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" + } + }, + "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==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "word-wrap": { @@ -15928,12 +18433,30 @@ "typedarray-to-buffer": "^3.1.5" } }, + "ws": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz", + "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==", + "dev": true + }, "xdg-basedir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", "dev": true }, + "xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=", + "dev": true + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, "xmlbuilder": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", @@ -15943,6 +18466,12 @@ "lodash": "^4.0.0" } }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, "xtend": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", @@ -15961,14 +18490,14 @@ } }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" }, "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "yaml": { "version": "1.10.0", @@ -15990,30 +18519,19 @@ } }, "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - } - } + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" }, "yargs-unparser": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.3.tgz", - "integrity": "sha512-xI32EGCq5mJiSCsQaEPLljD+R3Hq/VG08YGoLTOqu/gHAtCa2S4qPMG20ol4TpKWgSU7j3KMZHvSirNPK0DSjA==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.4.tgz", + "integrity": "sha512-QxEx9+qEr7jwVM4ngnk95+sKZ5QXm5gx0cL97LDby0SiC8HHoUK0LPBg475JwQcRCqIVfMD8SubCWp1dEgKuwQ==", "dev": true, "requires": { "camelcase": "^5.3.1", "decamelize": "^1.2.0", - "flat": "^4.1.0", + "flat": "^5.0.2", "is-plain-obj": "^1.1.0", "yargs": "^14.2.3" }, @@ -16041,12 +18559,52 @@ "wrap-ansi": "^5.1.0" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", @@ -16079,9 +18637,9 @@ } }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index 75cc8696..7b0b4a8c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "central-settlement", "description": "Central settlements hosted by a scheme to record and make settlements.", - "version": "11.0.2", + "version": "12.0.0", "license": "Apache-2.0", "private": false, "author": "ModusBox", @@ -24,51 +24,62 @@ }, "dependencies": { "@hapi/basic": "6.0.0", - "@hapi/boom": "9.0.0", + "@hapi/boom": "9.1.0", "@hapi/catbox-memory": "5.0.0", "@hapi/good": "9.0.1", - "@hapi/hapi": "18.4.1", - "@hapi/inert": "5.2.2", - "@hapi/vision": "5.5.4", + "@hapi/hapi": "19.2.0", + "@hapi/inert": "6.0.1", + "@hapi/vision": "6.0.0", "@mojaloop/central-ledger": "9.2.2", - "@mojaloop/central-services-database": "^10.6.1", - "@mojaloop/central-services-error-handling": "10.6.0", - "@mojaloop/central-services-health": "10.6.0", + "@mojaloop/central-services-database": "10.6.1", + "@mojaloop/central-services-error-handling": "11.0.0", + "@mojaloop/central-services-health": "11.0.0", "@mojaloop/central-services-logger": "10.6.0", - "@mojaloop/central-services-shared": "11.5.2", + "@mojaloop/central-services-shared": "11.5.4", "@mojaloop/central-services-stream": "10.6.0", "@mojaloop/ml-number": "11.0.0", "@now-ims/hapi-now-auth": "2.0.2", "async": "3.2.0", "async-retry": "1.3.1", + "bignumber.js": "9.0.1", "blipp": "4.0.2", - "event-stream": "4.0.1", "hapi-auth-bearer-token": "8.0.0", - "hapi-openapi": "1.2.6", - "mustache": "4.0.1", + "hapi-openapi": "2.0.2", + "hapi-swagger": "14.1.0", + "lodash": "4.17.20", + "mustache": "4.1.0", "parse-strings-in-object": "2.0.0", "rc": "1.2.8", - "uuid4": "2.0.2" + "uuid4": "2.0.2", + "vm": "0.1.0" }, "devDependencies": { - "@hapi/joi": "16.1.8", + "@hapi/joi": "17.1.1", + "@types/lodash": "4.14.168", + "axios": "0.21.1", "bluebird": "3.7.2", - "eslint": "7.15.0", + "chai": "4.2.0", + "chai-exclude": "2.0.2", + "chai-subset": "1.6.0", + "jest": "26.6.3", + "jest-junit": "12.0.0", + "eslint": "7.18.0", "faucet": "0.0.1", "get-port": "5.1.1", "node-fetch": "2.6.1", - "nodemon": "2.0.6", + "nodemon": "2.0.7", "npm-audit-resolver": "2.2.1", - "npm-check-updates": "10.2.3", + "npm-check-updates": "11.0.2", "nyc": "15.1.0", "pre-commit": "1.2.2", "proxyquire": "2.1.3", "rewire": "5.0.0", - "sinon": "9.2.1", + "supertest": "6.1.1", + "sinon": "9.2.4", "standard": "16.0.3", "swagmock": "1.0.0", "tap-xunit": "2.4.1", - "tape": "5.0.1", + "tape": "5.1.1", "tapes": "4.1.0" }, "pre-commit": [ @@ -80,17 +91,19 @@ "start": "run-p start:api", "start:api": "node src/api/index.js", "watch:api": "nodemon src/api/index.js", + "start:handlers": "node src/handlers/index.js", "regenerate": "yo swaggerize:test --framework hapi --apiPath './src/interface/swagger.yaml'", "standard": "standard", "lint": "eslint .", "test": "npm run test:unit | faucet", "test:all": "run-s test", - "test:unit": "tape 'test/unit/**/*.js'", - "test:xunit": "tape 'test/unit/**/*.js' | tap-xunit", + "test:unit": "tape 'test/unit/**/*.test.js'", + "test:xunit": "tape 'test/unit/**/*.test.js' | tap-xunit", "test:coverage": "nyc --reporter=lcov --reporter=text-summary tapes -- 'test/unit/**/**.test.js'", "test:coverage-check": "npm run test:coverage && nyc check-coverage", "test:int": "tape 'test/integration/**/*.test.js'", "test:integration": "sh ./test/integration-runner.sh ./test/integration-runner.env", + "test:int:new": "jest --config './jest.integration.config.js' --coverage --runInBand --testMatch '**/test/int/**/*.(test|spec).js'", "audit:resolve": "SHELL=sh resolve-audit --production", "audit:check": "SHELL=sh check-audit --production", "dep:check": "npx ncu -e 2", diff --git a/scripts/transferSettlementTemp/interchangeFeeCalculation.js b/scripts/transferSettlementTemp/interchangeFeeCalculation.js new file mode 100644 index 00000000..887140b7 --- /dev/null +++ b/scripts/transferSettlementTemp/interchangeFeeCalculation.js @@ -0,0 +1,47 @@ +/* eslint-disable no-undef */ +// ******************************************************** +// Name: Interchange fee calculation +// Type: notification +// Action: commit +// Status: success +// Start: 2020-06-01T00:00:00.000Z +// End: 2100-12-31T23:59:59.999Z +// Description: This script calculates the interchange fees between DFSPs where the account type is "Wallet" +// ******************************************************** + +// ## Globals: +// payload: The contents of the message from the Kafka topic. +// transfer: The transfer object. + +// # Functions: +// ## Data retrieval functions: +// getTransfer(transferId): Retrieves a mojaloop transfer from the central-ledger API. + +// ## Helper functions: +// getExtensionValue(list, key): Gets a value from an extension list +// log(message): allows the script to log to standard out for debugging purposes + +// Math functions: +// multiply(number1, number2, decimalPlaces): Uses ml-number to handle multiplication of money values + +// Ledger functions: +// addLedgerEntry: Adds a debit and credit ledger entry to the specified account to the specified DFSPs + +log(JSON.stringify(transfer)) +const payerFspId = transfer.payer.partyIdInfo.fspId +const payeeFspId = transfer.payee.partyIdInfo.fspId + +if ((payeeFspId !== payerFspId) && + (getExtensionValue(transfer.payee.partyIdInfo.extensionList.extension, 'accountType') === 'Wallet' && + getExtensionValue(transfer.payer.partyIdInfo.extensionList.extension, 'accountType') === 'Wallet') && + (transfer.transactionType.scenario === 'TRANSFER' && + transfer.transactionType.initiator === 'PAYER' && + transfer.transactionType.initiatorType === 'CONSUMER')) { + log(`Adding an interchange fee for Wallet to Wallet from ${payerFspId} to ${payeeFspId}`) + addLedgerEntry(payload.id, 'INTERCHANGE_FEE', // Ledger account type Id + 'INTERCHANGE_FEE', // Ledger entry type Id + multiply(transfer.amount.amount, 0.006, 2), + transfer.amount.currency, + payerFspId, + payeeFspId) +} diff --git a/src/domain/settlement/index.js b/src/domain/settlement/index.js index b3b220c4..a78dc84d 100644 --- a/src/domain/settlement/index.js +++ b/src/domain/settlement/index.js @@ -3,11 +3,8 @@ -------------- Copyright © 2017 Bill & Melinda Gates Foundation The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. - Contributors -------------- This is the official list of the Mojaloop project contributors for this file. @@ -18,17 +15,14 @@ Gates Foundation organization for an example). Those individuals should have their names indented and be marked with a '-'. Email address can be added optionally within square brackets . - * Gates Foundation - Name Surname - * ModusBox - Deon Botha - Georgi Georgiev - Miguel de Barros - Rajiv Mothilal - Valentin Genev - -------------- ******/ 'use strict' @@ -99,12 +93,12 @@ module.exports = { for (const key of Object.keys(settlementWindowsList)) { const windowContentRecord = await SettlementWindowContentModel.getBySettlementAndWindowId(settlementId, settlementWindowsList[key].id) windowContentResponseData = { - id: windowContentRecord[key].id, - state: windowContentRecord[key].state, - ledgerAccountType: windowContentRecord[key].ledgerAccountType, - currencyId: windowContentRecord[key].currencyId, - createdDate: windowContentRecord[key].createdDate, - changedDate: windowContentRecord[key].changedDate + id: windowContentRecord[0].id, + state: windowContentRecord[0].state, + ledgerAccountType: windowContentRecord[0].ledgerAccountType, + currencyId: windowContentRecord[0].currencyId, + createdDate: windowContentRecord[0].createdDate, + changedDate: windowContentRecord[0].changedDate } windowContentRecords.push(windowContentResponseData) settlementWindowsList[key].content = windowContentRecords diff --git a/src/domain/transactions/index.js b/src/domain/transactions/index.js new file mode 100644 index 00000000..2dc1e0e7 --- /dev/null +++ b/src/domain/transactions/index.js @@ -0,0 +1,61 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Lazola Lucas + -------------- + ******/ +'use strict' + +const IlpPacket = require('../../models/ilpPackets/ilpPacket') +const ErrorHandler = require('@mojaloop/central-services-error-handling') + +const ilpPacket = require('ilp-packet') +const base64url = require('base64url') + +const getById = async (id) => { + try { + return await IlpPacket.getById(id) + } catch (err) { + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } +} +const decodeIlpPacket = async (inputIlpPacket) => { + const binaryPacket = Buffer.from(inputIlpPacket, 'base64') + return ilpPacket.deserializeIlpPayment(binaryPacket) +} +/** + * Get the transaction object in the data field of an Ilp packet + * + * @returns {object} - Transaction Object + */ +const getTransactionObject = async function (inputIlpPacket) { + try { + const jsonPacket = await decodeIlpPacket(inputIlpPacket) + const decodedData = base64url.decode(jsonPacket.data.toString()) + return JSON.parse(decodedData) + } catch (err) { + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } +} +module.exports = { + getById, + getTransactionObject +} diff --git a/src/domain/transferSettlement/index.js b/src/domain/transferSettlement/index.js new file mode 100644 index 00000000..16e878ae --- /dev/null +++ b/src/domain/transferSettlement/index.js @@ -0,0 +1,49 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Deon Botha + - Lazola Lucas + - Claudio Viola + -------------- + ******/ + +const ErrorHandler = require('@mojaloop/central-services-error-handling') +const TransferSettlementModel = require('../../models/transferSettlement') + +module.exports = { + processMsgFulfil: async function (transferEventId, transferEventStateStatus, trx) { + try { + await TransferSettlementModel.updateStateChange(transferEventId, transferEventStateStatus, trx) + return true + } catch (err) { + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } + }, + insertLedgerEntries: async function insertLedgerEntries (ledgerEntries, transferEventId, trx) { + try { + await TransferSettlementModel.insertLedgerEntries(ledgerEntries, transferEventId, trx) + return true + } catch (err) { + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } + } + +} diff --git a/src/handlers/index.js b/src/handlers/index.js index 5cd0b942..14a8846b 100644 --- a/src/handlers/index.js +++ b/src/handlers/index.js @@ -25,12 +25,13 @@ * ModusBox - Georgi Georgiev - Miguel de Barros - -------------- - ******/ + - Deon Botha +******/ 'use strict' /** * @module Handlers CLI Startup + * Cli run command eg : node src/handlers/index.js handler --transferSettlement */ const Logger = require('@mojaloop/central-services-logger') @@ -50,7 +51,8 @@ Program.command('handler') // sub-command name, coffeeType = type, required .alias('h') // alternative sub-command is `h` .description('Start a specified Handler') // command description .option('--settlementwindow', 'Start the Settlement Window Handler') - // function to execute when command is uses + .option('--transfersettlement', 'Start the Transfer Settlement Handler') + // function to execute when command is used .action(async (args) => { const handlerList = [] if (args.settlementwindow && typeof args.settlementwindow === 'boolean') { @@ -62,6 +64,15 @@ Program.command('handler') // sub-command name, coffeeType = type, required handlerList.push(handler) } + if (args.transfersettlement && typeof args.transfersettlement === 'boolean') { + Logger.debug('CLI: Executing --transfersettlement') + const handler = { + type: 'transfersettlement', + enabled: true + } + handlerList.push(handler) + } + module.exports = Setup.initialize({ service: 'handler', port: Config.PORT, diff --git a/src/handlers/register.js b/src/handlers/register.js index 540f11eb..d15ecbc5 100644 --- a/src/handlers/register.js +++ b/src/handlers/register.js @@ -33,6 +33,7 @@ const ErrorHandling = require('@mojaloop/central-services-error-handling') const Logger = require('@mojaloop/central-services-logger') const requireGlob = require('require-glob') const SettlementWindowHandlers = require('./settlementWindow/handler') +const TransferSettlementHandler = require('./transferSettlement/handler') /** * @module src/handlers @@ -76,5 +77,9 @@ module.exports = { settlementWindow: { registerAllHandlers: SettlementWindowHandlers.registerAllHandlers, registerSettlementWindowHandler: SettlementWindowHandlers.registerSettlementWindowHandler + }, + transfersettlement: { + registerAllHandlers: TransferSettlementHandler.registerAllHandlers, + registerTransferSettlementHandler: TransferSettlementHandler.registerTransferSettlement } } diff --git a/src/handlers/transferSettlement/handler.js b/src/handlers/transferSettlement/handler.js new file mode 100644 index 00000000..65537145 --- /dev/null +++ b/src/handlers/transferSettlement/handler.js @@ -0,0 +1,173 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + + * Gates Foundation + - Name Surname + + * ModusBox + - Deon Botha + -------------- + ******/ +'use strict' + +/** + * @module src/handlers/transfers + */ +const Config = require('../../lib/config') +const Consumer = require('@mojaloop/central-services-stream').Util.Consumer +const Enum = require('@mojaloop/central-services-shared').Enum +const ErrorHandling = require('@mojaloop/central-services-error-handling') +const ErrorHandler = require('@mojaloop/central-services-error-handling') +const Kafka = require('@mojaloop/central-services-shared').Util.Kafka +const Logger = require('@mojaloop/central-services-logger') +const Producer = require('@mojaloop/central-services-stream').Util.Producer +const retry = require('async-retry') +const transferSettlementService = require('../../domain/transferSettlement') +const scriptsLoader = require('../../lib/scriptsLoader') +const Utility = require('@mojaloop/central-services-shared').Util +const Db = require('../../lib/db') +const SettlementModelModel = require('../../models/settlement/settlementModel.js') +const LOG_LOCATION = { module: 'TransferFulfilHandler', method: '', path: '' } // var object used as pointer +const CONSUMER_COMMIT = true +const FROM_SWITCH = true + +const RETRY_OPTIONS = { + retries: Config.WINDOW_AGGREGATION_RETRY_COUNT, + minTimeout: Config.WINDOW_AGGREGATION_RETRY_INTERVAL, + maxTimeout: Config.WINDOW_AGGREGATION_RETRY_INTERVAL +} + +const SCRIPTS_FOLDER = Config.HANDLERS.SETTINGS.SCRIPTS_FOLDER +let INJECTED_SCRIPTS = {} + +let MODEL_IS_CGS = false + +async function processTransferSettlement (error, messages) { + if (!MODEL_IS_CGS) return true + if (error) { + Logger.error(error) + throw ErrorHandling.Factory.reformatFSPIOPError(error) + } + Logger.info(Utility.breadcrumb(LOG_LOCATION, messages)) + let message = {} + try { + Logger.info(Utility.breadcrumb(LOG_LOCATION, { method: 'processTransferSettlement' })) + if (Array.isArray(messages)) { + message = messages[0] + } else { + message = messages + } + const payload = message.value.content.payload + const kafkaTopic = message.topic + const params = { message, kafkaTopic, decodedPayload: payload, consumer: Consumer, producer: Producer } + + const transferEventId = message.value.id + const transferEventAction = message.value.metadata.event.action + const transferEventStateStatus = message.value.metadata.event.state.status + const actionLetter = transferEventAction === Enum.Events.Event.Action.COMMIT + ? Enum.Events.ActionLetter.commit + : Enum.Events.ActionLetter.unknown + + if (!payload) { + Logger.info(Utility.breadcrumb(LOG_LOCATION, `missingPayload--${actionLetter}1`)) + const fspiopError = ErrorHandling.Factory.createInternalServerFSPIOPError('TransferSettlement handler missing payload') + const eventDetail = { functionality: Enum.Events.Event.Type.NOTIFICATION, action: Enum.Events.Event.Action.SETTLEMENT_WINDOW } + await Kafka.proceed(Config.KAFKA_CONFIG, params, { CONSUMER_COMMIT, fspiopError: fspiopError.toApiErrorObject(Config.ERROR_HANDLING), eventDetail, FROM_SWITCH }) + throw fspiopError + } + Logger.info(Utility.breadcrumb(LOG_LOCATION, 'validationPassed')) + + if (transferEventAction === Enum.Events.Event.Action.COMMIT) { + const scriptResults = await scriptsLoader.executeScripts(INJECTED_SCRIPTS, 'notification', transferEventAction, transferEventStateStatus, message.value) + const ledgerEntries = scriptResults.ledgerEntries ? scriptResults.ledgerEntries : [] + await retry(async () => { // use bail(new Error('to break before max retries')) + const knex = Db.getKnex() + await knex.transaction(async trx => { + try { + if (ledgerEntries.length > 0) { + await transferSettlementService.insertLedgerEntries(ledgerEntries, transferEventId, trx) + } + await transferSettlementService.processMsgFulfil(transferEventId, transferEventStateStatus, trx) + await trx.commit + } catch (err) { + await trx.rollback + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } + }) + Logger.info(Utility.breadcrumb(LOG_LOCATION, `done--${actionLetter}2`)) + return true + }, RETRY_OPTIONS) + return true + } + } catch (err) { + Logger.error(`${Utility.breadcrumb(LOG_LOCATION)}::${err.message}--0`) + return true + } +} + +/** + * @function registerTransferFulfillHandler + * + * @async + * @description Registers TransferFulfillHandler for processing fulfilled transfers. Gets Kafka config from default.json + * Calls createHandler to register the handler against the Stream Processing API + * @returns {boolean} - Returns a boolean: true if successful, or throws and error if failed + */ +async function registerTransferSettlement () { + try { + INJECTED_SCRIPTS = scriptsLoader.loadScripts(SCRIPTS_FOLDER) + MODEL_IS_CGS = await SettlementModelModel.getByName('CGS') + const transferFulfillHandler = { + command: processTransferSettlement, + topicName: Kafka.transformGeneralTopicName(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.EVENT), + config: Kafka.getKafkaConfig(Config.KAFKA_CONFIG, Enum.Kafka.Config.CONSUMER, Enum.Events.Event.Type.NOTIFICATION.toUpperCase(), Enum.Events.Event.Action.EVENT.toUpperCase()) + } + transferFulfillHandler.config.rdkafkaConf['client.id'] = transferFulfillHandler.topicName + await Consumer.createHandler(transferFulfillHandler.topicName, transferFulfillHandler.config, transferFulfillHandler.command) + return true + } catch (err) { + Logger.error(err) + throw ErrorHandling.Factory.reformatFSPIOPError(err) + } +} + +/** + * @function RegisterAllHandlers + * + * @async + * @description Registers all handlers + * + * @returns {boolean} - Returns a boolean: true if successful, or throws and error if failed + */ +async function registerAllHandlers () { + try { + await registerTransferSettlement() + return true + } catch (err) { + throw ErrorHandling.Factory.reformatFSPIOPError(err) + } +} + +module.exports = { + processTransferSettlement, + registerAllHandlers, + registerTransferSettlement +} diff --git a/src/lib/scriptEngine.js b/src/lib/scriptEngine.js new file mode 100644 index 00000000..0fbfcf23 --- /dev/null +++ b/src/lib/scriptEngine.js @@ -0,0 +1,92 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Deon Botha + - Lazola Lucas + - Claudio Viola + -------------- + ******/ +const MLNumber = require('@mojaloop/ml-number') +const Transaction = require('../domain/transactions/index') +const BigNumber = require('bignumber.js') +const Logger = require('@mojaloop/central-services-logger') +const ErrorHandler = require('@mojaloop/central-services-error-handling') + +const SCRIPT_TIMEOUT = 100 + +async function getTransferFromCentralLedger (transferId) { + const entity = await Transaction.getById(transferId) + if (entity) { + const transferObject = await Transaction.getTransactionObject(entity[0].value) + return transferObject + } else { + throw ErrorHandler.Factory.createFSPIOPError(ErrorHandler.Enums.FSPIOPErrorCodes.INTERNAL_SERVER_ERROR, `No records for transferId ${transferId} was found`) + } +} + +function multiply (number1, number2, decimalPlaces) { + const result = new MLNumber(number1).multiply(number2).toFixed(decimalPlaces, BigNumber.ROUND_HALF_UP) + return result +} + +function getExtensionValue (list, key) { + return list.find((extension) => { + return extension.key === key + }).value +} + +function log (message) { + Logger.info(message) +} + +async function execute (script, payload) { + try { + const transfer = await getTransferFromCentralLedger(payload.id) + const ledgerEntries = [] + const sandbox = { + payload, + log, + transfer, + multiply, + getExtensionValue, + addLedgerEntry: function (transferId, ledgerAccountTypeId, ledgerEntryTypeId, amount, currency, payerFspId, payeeFspId) { + ledgerEntries.push({ + transferId, + ledgerAccountTypeId, + ledgerEntryTypeId, + amount, + currency, + payerFspId, + payeeFspId + }) + } + } + script.runInNewContext(sandbox, { timeout: SCRIPT_TIMEOUT }) + return { ledgerEntries } + } catch (err) { + Logger.error(err) + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } +} + +module.exports = { + execute +} diff --git a/src/lib/scriptsLoader.js b/src/lib/scriptsLoader.js new file mode 100644 index 00000000..8c4c0c40 --- /dev/null +++ b/src/lib/scriptsLoader.js @@ -0,0 +1,135 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + + * Gates Foundation + - Name Surname + + * Claudio Viola + * Lazola Lucas + + -------------- + ******/ + +'use strict' +const _ = require('lodash') +const fs = require('fs') +const vm = require('vm') +const path = require('path') +const Logger = require('@mojaloop/central-services-logger') +const ErrorHandler = require('@mojaloop/central-services-error-handling') +const scriptEngine = require('./scriptEngine') + +function loadScripts (scriptDirectory) { + const scriptsMap = {} + const scriptDirectoryPath = path.join(process.cwd(), scriptDirectory) + let scriptFiles + try { + scriptFiles = fs.readdirSync(scriptDirectoryPath) + scriptFiles = scriptFiles.filter(fileName => { + return fs.statSync(path.join(scriptDirectoryPath, fileName)).isFile() + }) + } catch (err) { + Logger.error(`Error loading scripts from : ${scriptDirectoryPath}, ${err}`) + return scriptsMap + } + for (const scriptFile of scriptFiles) { + const scriptSource = fs.readFileSync(fs.realpathSync(scriptDirectoryPath + '/' + scriptFile), 'utf8') + const scriptLines = scriptSource.split(/\r?\n/) + retrieveScriptConfiguration(scriptLines, scriptsMap, scriptFile, scriptSource) + } + return scriptsMap +} + +/** + * [executeScripts Execute a script from the scriptsmap given a scriptType, scriptAction and scriptStatus providing the payload as argument] + * @param {[type]} scriptsMap [The object containing all loaded scripts] + * @param {[String]} scriptType [The topic type of the script to run] + * @param {[type]} scriptAction [The topic action of the script to run] + * @param {[type]} scriptStatus [The Topic status of the script to run] + * @param {[type]} payload [description] + * @return {Promise} [description] + */ +async function executeScripts (scriptsMap, scriptType, scriptAction, scriptStatus, payload) { + try { + const scriptResults = {} + if (scriptsMap[scriptType] && scriptsMap[scriptType][scriptAction] && scriptsMap[scriptType][scriptAction][scriptStatus]) { + const now = new Date() + for (const script of scriptsMap[scriptType][scriptAction][scriptStatus]) { + if (now.getTime() >= script.startTime.getTime() && now.getTime() <= script.endTime.getTime()) { + Logger.debug(`Running script: ${JSON.stringify(script)}`) + const scriptResult = await executeScript(script.script, payload) + Logger.debug(`Merging script result: ${scriptResult}`) + _.mergeWith(scriptResults, scriptResult, (objValue, srcValue) => { + if (_.isArray(objValue)) { + return objValue.concat(srcValue) + } + }) + } + } + } + return scriptResults + } catch (err) { + Logger.error(err) + throw ErrorHandler.Factory.createFSPIOPError(ErrorHandler.Enums.FSPIOPErrorCodes.VALIDATION_ERROR, 'Script execution was unsuccessful') + } +} + +async function executeScript (script, payload) { + try { + return await scriptEngine.execute(script, payload) + } catch (err) { + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } +} + +function retrieveScriptConfiguration (scriptLines, scriptsMap, scriptFile, scriptSource) { + for (let i = 0; i < scriptLines.length; i++) { + if (scriptLines[i].startsWith('// Type:')) { + const scriptType = scriptLines[i].split(':').pop().trim() + const scriptAction = scriptLines[i + 1].split(':').pop().trim() + const scriptStatus = scriptLines[i + 2].split(':').pop().trim() + const scriptStart = scriptLines[i + 3].substring(scriptLines[i + 3].indexOf(':') + 1).trim() + const scriptEnd = scriptLines[i + 4].substring(scriptLines[i + 4].indexOf(':') + 1).trim() + const script = { + filename: scriptFile, + startTime: new Date(scriptStart), + endTime: new Date(scriptEnd), + script: new vm.Script(scriptSource) + } + const scriptMap = {} + scriptMap[scriptType] = {} + scriptMap[scriptType][scriptAction] = {} + scriptMap[scriptType][scriptAction][scriptStatus] = [script] + Logger.info(`Loading script: ${scriptFile}: ${JSON.stringify(script)}`) + _.mergeWith(scriptsMap, scriptMap, (objValue, srcValue) => { + if (_.isArray(objValue)) { + return objValue.concat(srcValue) + } + }) + break + } + } +} + +module.exports = { + executeScripts, + loadScripts +} diff --git a/src/models/ilpPackets/ilpPacket.js b/src/models/ilpPackets/ilpPacket.js new file mode 100644 index 00000000..caaa5965 --- /dev/null +++ b/src/models/ilpPackets/ilpPacket.js @@ -0,0 +1,36 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Lazola Lucas + -------------- + ******/ +'use strict' + +const Db = require('../../lib/db') +const ErrorHandler = require('@mojaloop/central-services-error-handling') + +exports.getById = async (id) => { + try { + return await Db.ilpPacket.find({ transferId: id }) + } catch (err) { + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } +} diff --git a/src/models/settlement/facade.js b/src/models/settlement/facade.js index dd35169f..0218b62c 100644 --- a/src/models/settlement/facade.js +++ b/src/models/settlement/facade.js @@ -239,7 +239,7 @@ const settlementTransfersPrepare = async function (settlementId, transactionTime * @param enums.transferParticipantRoleTypes.HUB * @param enums.transferStates */ -const settlementTransfersReserve = async function (settlementId, transactionTimestamp, enums, trx = null) { +const settlementTransfersReserve = async function (settlementId, transactionTimestamp, requireLiquidityCheck, enums, trx = null) { const knex = await Db.getKnex() let isLimitExceeded, transferStateChangeId @@ -299,30 +299,33 @@ const settlementTransfersReserve = async function (settlementId, transactionTime .transacting(trx) .forUpdate() - // Select dfsp NET_DEBIT_CAP limit - const { netDebitCap } = await knex('participantLimit') - .select('value AS netDebitCap') - .where('participantCurrencyId', dfspAccountId) - .andWhere('participantLimitTypeId', enums.participantLimitTypes.NET_DEBIT_CAP) - .first() - .transacting(trx) - .forUpdate() - isLimitExceeded = netDebitCap - dfspPositionValue - dfspReservedValue - dfspAmount < 0 - - if (isLimitExceeded) { - /* let { startAfterParticipantPositionChangeId } = */ await knex('participantPositionChange') - .select('participantPositionChangeId AS startAfterParticipantPositionChangeId') - .where('participantPositionId', dfspPositionId) - .orderBy('participantPositionChangeId', 'desc') + if (requireLiquidityCheck) { + // Select dfsp NET_DEBIT_CAP limit + const { netDebitCap } = await knex('participantLimit') + .select('value AS netDebitCap') + .where('participantCurrencyId', dfspAccountId) + .andWhere('participantLimitTypeId', enums.participantLimitTypes.NET_DEBIT_CAP) .first() .transacting(trx) + .forUpdate() + isLimitExceeded = netDebitCap - dfspPositionValue - dfspReservedValue - dfspAmount < 0 + + if (isLimitExceeded) { + /* let { startAfterParticipantPositionChangeId } = */ + await knex('participantPositionChange') + .select('participantPositionChangeId AS startAfterParticipantPositionChangeId') + .where('participantPositionId', dfspPositionId) + .orderBy('participantPositionChangeId', 'desc') + .first() + .transacting(trx) - // TODO:: notify dfsp for NDC change - // TODO:: insert new limit with correct value for startAfterParticipantPositionChangeId - await ParticipantFacade.adjustLimits(dfspAccountId, { - type: 'NET_DEBIT_CAP', - value: new MLNumber(netDebitCap).add(dfspAmount).toNumber() - }, trx) + // TODO:: notify dfsp for NDC change + // TODO:: insert new limit with correct value for startAfterParticipantPositionChangeId + await ParticipantFacade.adjustLimits(dfspAccountId, { + type: 'NET_DEBIT_CAP', + value: new MLNumber(netDebitCap).add(dfspAmount).toNumber() + }, trx) + } } // Persist dfsp latestPosition @@ -758,7 +761,7 @@ const Facade = { const settlementData = await knex('settlement AS s') .join('settlementStateChange AS ssc', 'ssc.settlementStateChangeId', 's.currentStateChangeId') .join('settlementModel AS sm', 'sm.settlementModelId', 's.settlementModelId') - .select('s.settlementId', 'ssc.settlementStateId', 'ssc.reason', 'ssc.createdDate', 'sm.autoPositionReset') + .select('s.settlementId', 'ssc.settlementStateId', 'ssc.reason', 'ssc.createdDate', 'sm.autoPositionReset', 'sm.requireLiquidityCheck') .where('s.settlementId', settlementId) .first() .transacting(trx) @@ -769,6 +772,8 @@ const Facade = { } else { const autoPositionReset = settlementData.autoPositionReset delete settlementData.autoPositionReset + const requireLiquidityCheck = settlementData.requireLiquidityCheck + delete settlementData.requireLiquidityCheck // seq-settlement-6.2.5, step 5 const settlementAccountList = await knex('settlementParticipantCurrency AS spc') @@ -793,15 +798,12 @@ const Facade = { changedIdList: [] } const allAccounts = new Map() - let pid // participantId - let aid // accountId - let state // seq-settlement-6.2.5, step 8 for (const account of settlementAccountList) { - pid = account.participantId - aid = account.participantCurrencyId - state = account.settlementStateId + const pid = account.participantId + const aid = account.participantCurrencyId + const state = account.settlementStateId allAccounts[aid] = { id: aid, state, @@ -999,7 +1001,7 @@ const Facade = { if (settlementData.settlementStateId === enums.settlementStates.PENDING_SETTLEMENT) { await Facade.settlementTransfersPrepare(settlementId, transactionTimestamp, enums, trx) } else if (settlementData.settlementStateId === enums.settlementStates.PS_TRANSFERS_RECORDED) { - await Facade.settlementTransfersReserve(settlementId, transactionTimestamp, enums, trx) + await Facade.settlementTransfersReserve(settlementId, transactionTimestamp, requireLiquidityCheck, enums, trx) } else if (settlementData.settlementStateId === enums.settlementStates.PS_TRANSFERS_RESERVED) { await Facade.settlementTransfersCommit(settlementId, transactionTimestamp, enums, trx) } diff --git a/src/models/settlementWindow/facade.js b/src/models/settlementWindow/facade.js index 0984d58e..9cbaeba9 100644 --- a/src/models/settlementWindow/facade.js +++ b/src/models/settlementWindow/facade.js @@ -182,7 +182,6 @@ const Facade = { return knex.transaction(async (trx) => { try { const transactionTimestamp = new Date() - // Insert settlementWindowContent let builder = knex .from(knex.raw('settlementWindowContent (settlementWindowId, ledgerAccountTypeId, currencyId, createdDate)')) @@ -190,7 +189,9 @@ const Facade = { this.from('transferFulfilment AS tf') .join('transferParticipant AS tp', 'tp.transferId', 'tf.transferId') .join('participantCurrency AS pc', 'pc.participantCurrencyId', 'tp.participantCurrencyId') + .join('settlementModel AS m', 'm.ledgerAccountTypeId', 'pc.ledgerAccountTypeId') .where('tf.settlementWindowId', settlementWindowId) + .andWhere('m.settlementGranularityId', Enum.Settlements.SettlementGranularity.NET) .distinct('tf.settlementWindowId', 'pc.ledgerAccountTypeId', 'pc.currencyId', knex.raw('? AS ??', [transactionTimestamp, 'createdDate'])) }) @@ -204,12 +205,14 @@ const Facade = { this.from('transferFulfilment AS tf') .join('transferParticipant AS tp', 'tp.transferId', 'tf.transferId') .join('participantCurrency AS pc', 'pc.participantCurrencyId', 'tp.participantCurrencyId') + .join('settlementModel AS m', 'm.ledgerAccountTypeId', 'pc.ledgerAccountTypeId') .join('settlementWindowContent AS swc', function () { this.on('swc.settlementWindowId', 'tf.settlementWindowId') .on('swc.ledgerAccountTypeId', 'pc.ledgerAccountTypeId') .on('swc.currencyId', 'pc.currencyId') }) .where('tf.settlementWindowId', settlementWindowId) + .andWhere('m.settlementGranularityId', Enum.Settlements.SettlementGranularity.NET) .groupBy('swc.settlementWindowContentId', 'pc.participantCurrencyId', 'tp.transferParticipantRoleTypeId', 'tp.ledgerEntryTypeId') .select('swc.settlementWindowContentId', 'pc.participantCurrencyId', 'tp.transferParticipantRoleTypeId', 'tp.ledgerEntryTypeId', knex.raw('? AS ??', [Enum.Settlements.SettlementWindowState.CLOSED, 'settlementWindowStateId']), diff --git a/src/models/settlementWindow/index.js b/src/models/settlementWindow/index.js index 8a321451..f4cecb79 100644 --- a/src/models/settlementWindow/index.js +++ b/src/models/settlementWindow/index.js @@ -38,5 +38,6 @@ module.exports = { close: Facade.close, getByListOfIds: Facade.getByListOfIds, getBySettlementId: Facade.getBySettlementId, + getUnprocessedTransferParticipantEntryCount: Facade.getUnprocessedTransferParticipantEntryCount, createSettlementWindowState: settlementWindowStateChange.create } diff --git a/src/models/transferSettlement/facade.js b/src/models/transferSettlement/facade.js new file mode 100644 index 00000000..561cb5d9 --- /dev/null +++ b/src/models/transferSettlement/facade.js @@ -0,0 +1,305 @@ +/***** +License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Deon Botha + - Georgi Georgiev + - Valentin Genev + - Claudio Viola + -------------- + ******/ +'use strict' +const Db = require('../../lib/db') +const ErrorHandler = require('@mojaloop/central-services-error-handling') +const Logger = require('@mojaloop/central-services-logger') +const Utility = require('@mojaloop/central-services-shared').Util +const location = { module: 'TransferFulfilHandler', method: '', path: '' } +// const Config = require('../../lib/config') + +async function insertLedgerEntry (ledgerEntry, transferId, trx = null) { + try { + const knex = await Db.getKnex() + const trxFunction = async (trx, doCommit = true) => { + try { + const recordsToInsert = await knex.select(knex.raw('? AS transferId', transferId), 'PC.participantCurrencyId') + .select(knex.raw('IFNULL (??, ??) as ??', ['T1.transferparticipantroletypeId', 'T2.transferparticipantroletypeId', 'transferParticipantRoleTypeId'])) + .select('E.ledgerEntryTypeId') + .select(knex.raw('CASE ?? WHEN ? THEN ? WHEN ? THEN ? ELSE ? END AS ??', ['P.name', ledgerEntry.payerFspId, ledgerEntry.amount, ledgerEntry.payeeFspId, ledgerEntry.amount * -1, 0, 'amount'])) + .from('participantCurrency as PC') + .innerJoin('participant as P', 'P.participantId', 'PC.participantId') + .innerJoin('ledgerEntryType as E', 'E.LedgerAccountTypeId', 'PC.LedgerAccountTypeId') + .leftOuterJoin('transferParticipantRoleType as T1', function () { this.on('P.name', '=', knex.raw('?', [ledgerEntry.payerFspId])).andOn('T1.name', knex.raw('?', ['PAYER_DFSP'])) }) + .leftOuterJoin('transferParticipantRoleType as T2', function () { this.on('P.name', '=', knex.raw('?', [ledgerEntry.payeeFspId])).andOn('T2.name', knex.raw('?', ['PAYEE_DFSP'])) }) + .where('E.name', ledgerEntry.ledgerEntryTypeId) + .whereIn('P.name', [ledgerEntry.payerFspId, ledgerEntry.payeeFspId]) + .where('PC.currencyId', ledgerEntry.currency) + .transacting(trx) + + await knex('transferParticipant') + .insert(recordsToInsert) + .transacting(trx) + + await Promise.all(recordsToInsert.map(async record => { + const queryResult = await knex('participantPosition') + .where('participantCurrencyId', '=', record.participantCurrencyId) + .increment('value', record.amount) + .transacting(trx) + if (queryResult === 0) { + throw ErrorHandler.Factory.createInternalServerFSPIOPError(`Unable to update participantPosition record for participantCurrencyId: ${record.participantCurrencyId}`) + } + })) + + const transferStateChangeId = await knex('transferStateChange') + .select('transferStateChangeId') + .where('transferId', transferId) + .andWhere('transferStateId', 'COMMITTED') + .transacting(trx) + if (transferStateChangeId.length === 0 || !transferStateChangeId[0].transferStateChangeId || transferStateChangeId.length > 1) { + throw ErrorHandler.Factory.createInternalServerFSPIOPError(`Unable to find transfer with COMMITTED state for transferId : ${transferId}`) + } + + const participantPositionRecords = await knex('participantPosition') + .select('participantPositionId', 'value', 'reservedValue') + .where('participantCurrencyId', recordsToInsert[0].participantCurrencyId) + .orWhere('participantCurrencyId', recordsToInsert[1].participantCurrencyId) + .transacting(trx) + + if (participantPositionRecords.length !== 2) { + throw ErrorHandler.Factory.createInternalServerFSPIOPError(`Unable to find all participantPosition records for ParticipantCurrency: {${recordsToInsert[0].participantCurrencyId},${recordsToInsert[1].participantCurrencyId}}`) + } + const participantPositionChangeRecords = participantPositionRecords.map(participantPositionRecord => { + participantPositionRecord.transferStateChangeId = transferStateChangeId[0].transferStateChangeId + return participantPositionRecord + }) + + await knex('participantPositionChange') + .insert(participantPositionChangeRecords) + .transacting(trx) + + if (doCommit) { + await trx.commit + } + } catch (err) { + if (doCommit) { + await trx.rollback + } + throw err + } + } + if (trx) { + return await trxFunction(trx, false) + } else { + return await knex.transaction(trxFunction) + } + } catch (err) { + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } +} + +async function insertLedgerEntries (ledgerEntries, transferId, trx = null) { + Logger.info(`Ledger entries: ${JSON.stringify(ledgerEntries)}`) + try { + const knex = await Db.getKnex() + const trxFunction = async (trx, doCommit = true) => { + try { + for (const ledgerEntry of ledgerEntries) { + Logger.info(`Inserting ledger entry: ${JSON.stringify(ledgerEntry)}`) + await insertLedgerEntry(ledgerEntry, transferId, trx) + } + if (doCommit) { + await trx.commit + } + } catch (err) { + if (doCommit) { + await trx.rollback + } + throw err + } + } + if (trx) { + return await trxFunction(trx, false) + } else { + return await knex.transaction(trxFunction) + } + } catch (err) { + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } +} + +async function updateTransferSettlement (transferId, status, trx = null) { + Logger.info(Utility.breadcrumb(location, { method: 'updateTransferSettlement' })) + try { + const knex = await Db.getKnex() + const trxFunction = async (trx, doCommit = true) => { + try { + // Insert TransferParticipant ledger entry type. + await knex.from(knex.raw('transferParticipant (transferID, participantCurrencyId, transferParticipantRoleTypeId, ledgerEntryTypeId, amount)')) + .insert(function () { + this.from('transferParticipant AS TP') + .select('TP.transferId', 'TP.participantCurrencyId', 'TP.transferParticipantRoleTypeId', 'TP.ledgerEntryTypeId', knex.raw('?? * -1', ['TP.amount'])) + .innerJoin('participantCurrency AS PC', 'TP.participantCurrencyId', 'PC.participantCurrencyId') + .innerJoin('settlementModel AS M', 'PC.ledgerAccountTypeId', 'M.ledgerAccountTypeId') + .innerJoin('settlementGranularity AS G', 'M.settlementGranularityId', 'G.settlementGranularityId') + .where(function () { + this.where({ 'TP.transferId': transferId }) + this.andWhere(function () { + this.andWhere({ 'G.name': 'GROSS' }) + }) + }) + .union(function () { + this.select('TP.transferId', 'PC1.participantCurrencyId', 'TP.transferParticipantRoleTypeId', 'TP.ledgerEntryTypeId', 'TP.amount') + .from('transferParticipant AS TP') + .innerJoin('participantCurrency AS PC', 'TP.participantCurrencyId', 'PC.participantCurrencyId') + .innerJoin('settlementModel AS M', 'PC.ledgerAccountTypeId', 'M.ledgerAccountTypeId') + .innerJoin('settlementGranularity AS G', 'M.settlementGranularityId', 'G.settlementGranularityId') + .innerJoin('participantCurrency AS PC1', function () { + this.on('PC1.currencyId', 'PC.currencyId') + .andOn('PC1.participantId', 'PC.participantId') + .andOn('PC1.ledgerAccountTypeId', 'M.settlementAccountTypeId') + }) + .where(function () { + this.where({ 'TP.transferId': transferId }) + this.andWhere(function () { + this.andWhere({ 'G.name': 'GROSS' }) + }) + }) + }) + }) + .transacting(trx) + + // Insert a new status for the transfer. + const transferStateChange = [ + { + transferId: transferId, + transferStateId: 'SETTLED', + reason: 'Gross settlement process' + } + ] + + await knex('transferStateChange').insert(transferStateChange) + .transacting(trx) + + // Update the positions + await knex('participantPosition AS PP') + .update({ value: knex.raw('?? - ??', ['PP.value', 'TR.amount']) }) + .innerJoin(function () { + this.from('transferParticipant AS TP') + .select('PC.participantCurrencyId', 'TP.Amount') + .innerJoin('participantCurrency AS PC', 'TP.participantCurrencyId', 'PC.participantCurrencyId') + .innerJoin('settlementModel AS M', 'M.ledgerAccountTypeId', 'PC.ledgerAccountTypeId') + .innerJoin('settlementGranularity AS G', 'M.settlementGranularityId', 'G.settlementGranularityId') + .where(function () { + this.where({ 'TP.transferId': transferId }) + this.andWhere(function () { + this.andWhere({ 'G.name': 'GROSS' }) + }) + }) + .union(function () { + this.select('PC1.participantCurrencyId', 'TP.amount') + .from('transferParticipant AS TP') + .innerJoin('participantCurrency AS PC', 'TP.participantCurrencyId', 'PC.participantCurrencyId') + .innerJoin('settlementModel AS M', 'M.ledgerAccountTypeId', 'PC.ledgerAccountTypeId') + .innerJoin('settlementGranularity AS G', 'M.settlementGranularityId', 'G.settlementGranularityId') + .innerJoin('participantCurrency AS PC1', function () { + this.on('PC1.currencyId', 'PC.currencyId') + .andOn('PC1.participantId', 'PC.participantId') + .andOn('PC1.ledgerAccountTypeId', 'M.settlementAccountTypeId') + }) + .where(function () { + this.where({ 'TP.transferId': transferId }) + this.andWhere(function () { + this.andWhere({ 'G.name': 'GROSS' }) + }) + }) + }) + }).joinRaw('AS TR ON PP.participantCurrencyId = TR.ParticipantCurrencyId') + .transacting(trx) + + // Insert new participant position change records + await knex.from(knex.raw('participantPositionChange (participantPositionId, transferStateChangeId, value, reservedValue)')) + .insert(function () { + this.from('participantPosition AS PP') + .select('PP.participantPositionId', 'TSC.transferStateChangeId', 'PP.value', 'PP.reservedValue') + .innerJoin(function () { + this.from('transferParticipant AS TP') + .select('PC.participantCurrencyId') + .innerJoin('participantCurrency AS PC', 'TP.participantCurrencyId', 'PC.participantCurrencyId') + .innerJoin('settlementModel AS M', 'M.ledgerAccountTypeId', 'PC.ledgerAccountTypeId') + .innerJoin('settlementGranularity AS G', 'M.settlementGranularityId', 'G.settlementGranularityId') + .where(function () { + this.where({ 'TP.transferId': transferId }) + this.andWhere(function () { + this.andWhere({ 'G.name': 'GROSS' }) + }) + }) + .union(function () { + this.select('PC1.participantCurrencyId') + .from('transferParticipant AS TP') + .innerJoin('participantCurrency AS PC', 'TP.participantCurrencyId', 'PC.participantCurrencyId') + .innerJoin('settlementModel AS M', 'M.ledgerAccountTypeId', 'PC.ledgerAccountTypeId') + .innerJoin('settlementGranularity AS G', 'M.settlementGranularityId', 'G.settlementGranularityId') + .innerJoin('participantCurrency AS PC1', function () { + this.on('PC1.currencyId', 'PC.currencyId') + .andOn('PC1.participantId', 'PC.participantId') + .andOn('PC1.ledgerAccountTypeId', 'M.settlementAccountTypeId') + }) + .where(function () { + this.where({ 'TP.transferId': transferId }) + this.andWhere(function () { + this.andWhere({ 'G.name': 'GROSS' }) + }) + }) + }) + }) + this.joinRaw('AS TR ON PP.participantCurrencyId = TR.ParticipantCurrencyId') + .innerJoin('transferStateChange AS TSC', function () { + this.on('TSC.transferID', knex.raw('?', [transferId])) + .andOn('TSC.transferStateId', '=', knex.raw('?', ['SETTLED'])) + }) + }) + .transacting(trx) + + if (doCommit) { + await trx.commit + } + } catch (err) { + if (doCommit) { + await trx.rollback + } + throw err + } + } + if (trx) { + return await trxFunction(trx, false) + } else { + return await knex.transaction(trxFunction) + } + } catch (err) { + throw ErrorHandler.Factory.reformatFSPIOPError(err) + } +} + +const Facade = { + insertLedgerEntry, + insertLedgerEntries, + updateTransferSettlement +} + +module.exports = Facade diff --git a/src/models/transferSettlement/index.js b/src/models/transferSettlement/index.js new file mode 100644 index 00000000..fdcc1f6c --- /dev/null +++ b/src/models/transferSettlement/index.js @@ -0,0 +1,37 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModuxBox + - Deon Botha + - Georgi Georgiev + - Miguel de Barros + - Rajiv Mothilal + - Valentin Genev + -------------- + ******/ +'use strict' + +const Facade = require('./facade') + +module.exports = { + updateStateChange: Facade.updateTransferSettlement, + getTransactionObject: Facade.getTransactionRequest, + insertLedgerEntries: Facade.insertLedgerEntries +} diff --git a/src/shared/setup.js b/src/shared/setup.js index 5326bd83..48eda5e2 100644 --- a/src/shared/setup.js +++ b/src/shared/setup.js @@ -144,10 +144,14 @@ const createHandlers = async (handlers) => { let error if (handler.enabled) { Logger.info(`Handler Setup - Registering ${JSON.stringify(handler)}!`) + console.log(`Handler Setup - Registering ${JSON.stringify(handler)}!`) switch (handler.type) { case 'settlementwindow': await RegisterHandlers.settlementWindow.registerSettlementWindowHandler() break + case 'transfersettlement': + await RegisterHandlers.transfersettlement.registerTransferSettlementHandler() + break default: error = `Handler Setup - ${JSON.stringify(handler)} is not a valid handler to register!` Logger.error(error) diff --git a/test-integration.Dockerfile b/test-integration.Dockerfile index 6725d92b..28566893 100644 --- a/test-integration.Dockerfile +++ b/test-integration.Dockerfile @@ -22,4 +22,4 @@ COPY README.md /opt/central-settlement RUN cp -f /opt/central-settlement/test/integration-config-centralsettlement.json /opt/central-settlement/config/default.json EXPOSE 3007 -CMD node src/server.js +CMD node src/api/index.js diff --git a/test/int/index.test.js b/test/int/index.test.js new file mode 100644 index 00000000..b6e44dbf --- /dev/null +++ b/test/int/index.test.js @@ -0,0 +1,238 @@ +/* eslint-env jest */ + +let request = require('supertest') +const config = require('../../config/default.json') + +const Kafka = require('@mojaloop/central-services-shared').Util.Kafka +const Config = require('../../src/lib/config') +const KafkaProducer = require('@mojaloop/central-services-stream').Util.Producer +const Enum = require('@mojaloop/central-services-shared').Enum +const Uuid = require('uuid4') +const Db = require('../../src/lib/db') +const ilpPacket = require('ilp-packet') +const base64url = require('base64url') + +const chai = require('chai') +const chaiExclude = require('chai-exclude') +const chaiSubset = require('chai-subset') + +chai.use(chaiExclude) +chai.use(chaiSubset) +const expect = chai.expect + +function timeout (ms) { + return new Promise(resolve => setTimeout(resolve, ms)) +} + +describe('when a transfer notification with COMMITTED status is received ', () => { + // TODO refactor send kafka message in before() + // refactor separate checks + it(`it should + update the ledger entries, + update the participantPosition records for payeer and payee + update participantPositionChange records for payeer and payee + with a 0.006 % fee amount`, async () => { + await require('../../src/api/index.js') + request = request(`http://localhost:${config.PORT}`) + + const transactionId = Uuid() + const message = { + value: { + from: 'fsp781121341', + to: 'fsp200195706', + id: transactionId, + content: { + uriParams: { + id: '5ea32b43-29c0-4067-8131-4a97a58801b7' + }, + headers: { + 'content-type': + 'application/vnd.interoperability.transfers+json;version=1.0', + accept: + 'application/vnd.interoperability.transfers+json;version=1.0', + date: '2020-08-11T14:26:42.000Z', + 'fspiop-source': 'fsp781121341', + 'fspiop-destination': 'fsp200195706', + 'user-agent': 'axios/0.19.2', + 'content-length': 1349, + host: 'localhost:3000', + connection: 'close' + }, + payload: + 'data:application/vnd.interoperability.transfers+json;version=1.0;base64,eyJ0cmFuc2ZlcklkIjoiNWVhMzJiNDMtMjljMC00MDY3LTgxMzEtNGE5N2E1ODgwMWI3IiwicGF5ZXJGc3AiOiJmc3A3ODExMjEzNDEiLCJwYXllZUZzcCI6ImZzcDIwMDE5NTcwNiIsImFtb3VudCI6eyJhbW91bnQiOiI0NS44NSIsImN1cnJlbmN5IjoiVFpTIn0sImlscFBhY2tldCI6IkFZSUM5QUFBQUFBQUFCZHdIV2N1Y0dGNVpXVm1jM0F1YlhOcGMyUnVMakl5TlRVMk9UazVNVEkxZ2dMS1pYbEtNR050Um5Wak1rWnFaRWRzZG1KcmJHdEphbTlwVFhwRmVrMTZTbXROYW1OMFRucFJNMWxwTURCUFZHczFURlJuZDA5VVNYUk9hazAxVDFkSk0xcEVhM2haYWtVMFNXbDNhV05ZVm5aa1IxWktXa05KTmtsdFVUVlpWRVpxVDFSV2EweFVVbXhhYWxsMFRrZEZlVTVETVdoT2JVNXBURmRKZWs1SFNURlBSRkV6VDFSTmVVMXBTWE5KYmtKb1pWZFdiRWxxY0RkSmJrSm9ZMjVTTlZOWFVrcGliVnAyU1dwd04wbHVRbWhqYmxJMVUxZFNWV1ZZUW14SmFtOXBWRlpPU2xVd1VrOUphWGRwWTBkR2VXUkliRXBhUjFaMVpFZHNiV0ZYVm5sSmFtOXBUV3BKTVU1VVdUVlBWR3Q0VFdwVmFVeERTbTFqTTBKS1drTkpOa2x1UW1obFYxWnNXbTVPZDBsdU1UbE1RMHAzV1Zoc2JHTnBTVFpsZVVwM1dWaEtNR1ZWYkd0VFZ6VnRZbmxKTm1WNVNuZFpXRW93WlZWc2ExWkliSGRhVTBrMlNXc3hWRk5XVGtWVWFVbHpTVzVDYUdOdVVqVlRWMUpzWW01U2NGcHRiR3hqYVVrMlNXcEplVTVVUVROTlJFRTBUVlJuZUVscGQybGFiazUzVTFkUmFVOXBTbmRaV0d4c1kyMWFlbU5EU2psTVEwcDNXbGhLZW1JeU5XaGlSV3gxV20wNGFVOXVjMmxaTWpsMFkwZDRiR1ZGTldoaVYxVnBUMjV6YVZwdGJIbGpNMUpQV1ZjeGJFbHFiMmxVVjBZd1kzbEpjMGx0ZUdoak0xSlBXVmN4YkVscWIybFRSMFp1WWxkR2RVbHVNSE5KYlZKb1pFZFdVRnByU25CamJsSnZTV3B2YVUxVWF6Uk5lVEI0VFVNd2VVNVRTamxtVTNkcFdWY3hkbVJYTlRCSmFuQTNTVzFHZEdJelZuVmtRMGsyU1dwWmQwbHBkMmxaTTFaNVkyMVdkVmt6YTJsUGFVcFdWVEJSYVdaVGQybGtTRXBvWW01T2FGa3pVbkJpTWpWVlpWaENiRWxxY0RkSmJrNXFXbGMxYUdOdGJIWkphbTlwVmtaS1FsUnNUa2RTVmtscFRFTktjR0p0YkRCaFYwWXdZak5KYVU5cFNsRlJWbXhHVldsSmMwbHRiSFZoV0ZKd1dWaFNkbU5zVWpWalIxVnBUMmxLUkZRd05WUldWVEZHVldsS09XWlJBQSIsImNvbmRpdGlvbiI6InUxY1NUQkxFWjAzYXd2ckxIV2FRakNuZDNHQUI5XzE3WTJXaEdkdmVwamsiLCJleHBpcmF0aW9uIjoiMjAyMC0wOC0xMlQxNjoyNjo0Mi43NDBaIiwiZXh0ZW5zaW9uTGlzdCI6eyJleHRlbnNpb24iOlt7ImtleSI6InByZXBhcmUiLCJ2YWx1ZSI6ImRlc2NyaXB0aW9uIn1dfX0' + }, + type: 'application/json', + metadata: { + correlationId: '5ea32b43-29c0-4067-8131-4a97a58801b7', + event: { + type: 'notification', + action: 'prepare', + createdAt: '2020-08-11T16:26:42.746Z', + state: { + status: 'success', + code: 0, + description: 'action successful' + }, + id: 'dbdfd85f-efec-4354-a522-53f0cdc992bf', + responseTo: '0f5c199e-d3b8-4e2e-81ed-fb0707d68d40' + } + } + }, + size: 3409, + key: null, + topic: 'topic-notification-event', + offset: 94, + partition: 0, + timestamp: 1597163203169 + } + + const TRANSACTION = { + transactionId: transactionId, + quoteId: '61b095e0-530e-46f5-9795-1bf1a19d4fd2', + payee: { + partyIdInfo: { + partyIdType: 'MSISDN', + partyIdentifier: '27713803915', + fspId: 'testfsp2', + extensionList: { + extension: [ + { + key: 'accountType', + value: 'Wallet' + } + ] + } + }, + personalInfo: { + complexName: { + firstName: 'testfsp2WalletFname', + lastName: 'testfsp2WalletLname' + }, + dateOfBirth: '1985-05-13' + } + }, + payer: { + partyIdInfo: { + partyIdType: 'MSISDN', + partyIdentifier: '27713803914', + fspId: 'testfsp1', + extensionList: { + extension: [ + { + key: 'accountType', + value: 'Wallet' + } + ] + } + }, + name: 'testfsp1Fname testfsp1Lname' + }, + amount: { + amount: '211.15', + currency: 'TZS' + }, + transactionType: { + scenario: 'TRANSFER', + initiator: 'PAYER', + initiatorType: 'CONSUMER' + } + } + + const transactionObject = { + transactionId: TRANSACTION.transactionId, + quoteId: TRANSACTION.quoteId, + payee: TRANSACTION.payee, + payer: TRANSACTION.payer, + amount: TRANSACTION.amount, + transactionType: TRANSACTION.transactionType, + note: 'test payment' + } + + const ilpData = Buffer.from(base64url(JSON.stringify(transactionObject))) + const decimalPlaces = 2 + const packetInput = { + amount: `${Number(TRANSACTION.amount) * Math.pow(10, decimalPlaces)}`, // unsigned 64bit integer as a string + account: `g.${TRANSACTION.payer.fspId}.${TRANSACTION.payer.partyIdInfo.partyIdType.toLowerCase()}.${TRANSACTION.payer.partyIdInfo.partyIdentifier.toLowerCase()}`, // ilp address + data: ilpData // base64url encoded attached data + } + const packet = ilpPacket.serializeIlpPayment(packetInput) + + const base64encodedIlpPacket = base64url.fromBase64(packet.toString('base64')).replace('"', '') + + // const jsonPacket2 = await ilpPacket.deserializeIlpPayment(Buffer.from(base64encodedIlpPacket, 'base64')) + + await Db.transferDuplicateCheck.insert({ + transferId: transactionId, + hash: 'someHash' + }) + await Db.transfer.insert({ + transferId: transactionId, + amount: TRANSACTION.amount.amount, + currencyId: TRANSACTION.amount.currency, + ilpCondition: 'testCondition', + expirationDate: '2020-06-30 17:10:51' + }) + await Db.ilpPacket.insert({ + transferId: transactionId, + value: base64encodedIlpPacket + }) + await Db.transferStateChange.insert({ + transferId: transactionId, + transferStateId: 'COMMITTED' + }) + const knex = await Db.getKnex() + const transferStateChangeId = await knex('transferStateChange') + .select('transferStateChangeId') + .where('transferId', transactionId) + .andWhere('transferStateId', 'COMMITTED') + const previousParticipantPositionRecords = await knex('participantPosition') + .select('participantPositionId', 'value', 'reservedValue') + .where('participantCurrencyId', 14) + .orWhere('participantCurrencyId', 13) + + await Kafka.produceGeneralMessage( + Config.KAFKA_CONFIG, + KafkaProducer, + Enum.Events.Event.Type.NOTIFICATION, + Enum.Events.Event.Action.COMMIT, + message.value, + Enum.Events.EventStatus.SUCCESS, + 'fsp511290656' + ) + + // wait timeout for processing the records + await timeout(7000) + + const transferParticipantRecords = await knex('transferParticipant') + .where('transferId', transactionId) + + expect(transferParticipantRecords) + .excluding(['transferParticipantId', 'createdDate']) + .to.deep.members([ + { + transferId: transactionId, + participantCurrencyId: 13, + transferParticipantRoleTypeId: 1, + ledgerEntryTypeId: 2, + amount: 1.27 + }, + { + transferId: transactionId, + participantCurrencyId: 14, + transferParticipantRoleTypeId: 2, + ledgerEntryTypeId: 2, + amount: -1.27 + }]) + const newParticipantPositionRecords = await knex('participantPosition') + .select('participantPositionId', 'value', 'reservedValue') + .where('participantCurrencyId', 14) + .orWhere('participantCurrencyId', 13) + expect(newParticipantPositionRecords[0].value).to.equal(previousParticipantPositionRecords[0].value + 1.27) + expect(newParticipantPositionRecords[1].value).to.equal(previousParticipantPositionRecords[1].value - 1.27) + + const participantPositionChangeRecords = await knex('participantPositionChange') + .where('transferStateChangeId', transferStateChangeId[0].transferStateChangeId) + expect(participantPositionChangeRecords[0].value.toFixed(decimalPlaces)).to.equal(newParticipantPositionRecords[0].value.toFixed(decimalPlaces)) + expect(participantPositionChangeRecords[1].value.toFixed(decimalPlaces)).to.equal(newParticipantPositionRecords[1].value.toFixed(decimalPlaces)) + }, 30000) +}) diff --git a/test/integration-config-centralledger.json b/test/integration-config-centralledger.json index b7ff797c..d40cc5ca 100644 --- a/test/integration-config-centralledger.json +++ b/test/integration-config-centralledger.json @@ -91,6 +91,7 @@ ] }, "INTERNAL_TRANSFER_VALIDITY_SECONDS": "432000", + "ENABLE_ON_US_TRANSFERS": false, "EMAIL_USER": "modusboxemailtest@gmail.com", "EMAIL_PASSWORD": "April2o0%", "EMAIL_SMTP": "smtp.gmail.com", @@ -443,5 +444,6 @@ } } } - } + }, + "SETTLEMENT_MODELS": ["DEFERREDNET"] } diff --git a/test/integration-config-centralsettlement.json b/test/integration-config-centralsettlement.json index 10c31fba..f4054f12 100644 --- a/test/integration-config-centralsettlement.json +++ b/test/integration-config-centralsettlement.json @@ -31,6 +31,9 @@ "DISABLED": false, "API": { "DISABLED": false + }, + "SETTINGS": { + "SCRIPTS_FOLDER": "./scripts/transferSettlementTemp" } }, "KAFKA": { @@ -57,6 +60,31 @@ "rdkafkaConf": { "client.id": "cs-con-setlementwindow-close", "group.id": "cs-group-setlementwindow-close", + "metadata.broker.list": "kafka-int:9092", + "socket.keepalive.enable": true + }, + "topicConf": { + "auto.offset.reset": "earliest" + } + } + } + }, + "NOTIFICATION": { + "EVENT": { + "config": { + "options": { + "mode": 2, + "batchSize": 1, + "pollFrequency": 10, + "recursiveTimeout": 100, + "messageCharset": "utf8", + "messageAsJSON": true, + "sync": true, + "consumeTimeout": 1000 + }, + "rdkafkaConf": { + "client.id": "cs-con-transferfulfil-process", + "group.id": "cs-group-transferfulfil-process", "metadata.broker.list": "db-int:9092", "socket.keepalive.enable": true }, diff --git a/test/integration-runner.env b/test/integration-runner.env index 19115357..dd3b67ad 100755 --- a/test/integration-runner.env +++ b/test/integration-runner.env @@ -28,7 +28,7 @@ APP_DIR_TEST_INTEGRATION=${APP_DIR_TEST_RESULTS:-"$TEST_DIR/$INTEGRATION_DIR"} APP_DIR_TEST_RESULTS=${APP_DIR_TEST_RESULTS:-"$TEST_DIR/$RESULT_DIR"} TEST_RESULTS_FILE=${TEST_RESULTS_FILE:-"tape-integration.xml"} -TEST_CMD=${TEST_CMD:-"mkdir -p $APP_DIR_TEST_RESULTS; tape '${APP_DIR_TEST_INTEGRATION}/**/*.test.js' | tap-xunit > $APP_DIR_TEST_RESULTS/$TEST_RESULTS_FILE"} +TEST_CMD=${TEST_CMD:-"mkdir -p $APP_DIR_TEST_RESULTS; tape '${APP_DIR_TEST_INTEGRATION}/**/*.test.js'"} SIMULATOR_HOST=${SIMULATOR_HOST:-"simulator-int"} SIMULATOR_PORT=${SIMULATOR_PORT:-"8444"} @@ -39,8 +39,12 @@ SIMULATOR_REMOTE_PORT=${SIMULATOR_REMOTE_PORT:-"8444"} CENTRAL_LEDGER_HOST=${CENTRAL_LEDGER_HOST:-"central-ledger-int"} CENTRAL_LEDGER_PORT=${CENTRAL_LEDGER_PORT:-"3001"} CENTRAL_LEDGER_IMAGE=${CENTRAL_LEDGER_IMAGE:-'mojaloop/central-ledger'} +CENTRAL_LEDGER_LOG_LEVEL="debug" CENTRAL_LEDGER_TAG=${CENTRAL_LEDGER_TAG:-'latest'} ML_API_ADAPTER_HOST=${ML_API_ADAPTER_HOST:-"ml-api-adapter-int"} ML_API_ADAPTER_PORT=${ML_API_ADAPTER_PORT:-"3000"} ML_API_ADAPTER_IMAGE=${ML_API_ADAPTER_IMAGE:-'mojaloop/ml-api-adapter'} ML_API_ADAPTER_TAG=${ML_API_ADAPTER_TAG:-'latest'} +TRANSFERS_ILPPACKET=${TRANSFERS_ILPPACKET} +TRANSFERS_FULFILMENT=${TRANSFERS_FULFILMENT} +TRANSFERS_CONDITION=${TRANSFERS_CONDITION} diff --git a/test/integration/config.js b/test/integration/config.js new file mode 100644 index 00000000..1904b768 --- /dev/null +++ b/test/integration/config.js @@ -0,0 +1,28 @@ +const config = { + URI_PREFIX: 'http', + CENTRAL_LEDGER_HOST: process.env.CENTRAL_LEDGER_HOST || 'localhost', + CENTRAL_LEDGER_PORT: process.env.CENTRAL_LEDGER_PORT || '3001', + CENTRAL_LEDGER_BASE: '', + ML_API_ADAPTER_HOST: process.env.ML_API_ADAPTER_HOST || 'localhost', + ML_API_ADAPTER_PORT: process.env.ML_API_ADAPTER_PORT || '3000', + ML_API_ADAPTER_BASE: '', + SIMULATOR_HOST: process.env.SIMULATOR_HOST || 'localhost', + SIMULATOR_PORT: process.env.SIMULATOR_PORT || '8444', + SIMULATOR_CORR_ENDPOINT: '/payeefsp/correlationid', + SIMULATOR_REMOTE_HOST: process.env.SIMULATOR_REMOTE_HOST || 'simulator-int', + SIMULATOR_REMOTE_PORT: process.env.SIMULATOR_REMOTE_PORT || '8444', + get CENTRAL_LEDGER_URL () { + return `${this.URI_PREFIX}://${this.CENTRAL_LEDGER_HOST}:${this.CENTRAL_LEDGER_PORT}${this.CENTRAL_LEDGER_BASE}` + }, + get SIMULATOR_URL () { + return `${this.URI_PREFIX}://${this.SIMULATOR_REMOTE_HOST}:${this.SIMULATOR_REMOTE_PORT}` + }, + get ML_API_ADAPTER_URL () { + return `${this.URI_PREFIX}://${this.ML_API_ADAPTER_HOST}:${this.ML_API_ADAPTER_PORT}${this.ML_API_ADAPTER_BASE}` + }, + get SIMULATOR_HOST_URL () { + return `${this.URI_PREFIX}://${this.SIMULATOR_HOST}:${this.SIMULATOR_PORT}${this.SIMULATOR_CORR_ENDPOINT}` + } +} + +module.exports = config diff --git a/test/integration/helpers/api.js b/test/integration/helpers/api.js new file mode 100644 index 00000000..fe84d306 --- /dev/null +++ b/test/integration/helpers/api.js @@ -0,0 +1,153 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Claudio Viola + -------------- + ******/ +'use strict' + +const Config = require('../config') +const axios = require('axios') +const Utils = require('./utils') +const Logger = require('@mojaloop/central-services-logger') + +async function createSettlementModel (settlementModel) { + const url = `${Config.CENTRAL_LEDGER_URL}/settlementModels` + return axios.post(url, settlementModel, { + headers: { + 'content-type': 'application/json' + } + }) +} + +async function getParticipantAccount (currency) { + const url = `${Config.CENTRAL_LEDGER_URL}/participants/Hub/accounts?currency=${currency}` + const res = await axios.get(url) + return res.data +} + +async function createParticipantAccount (currency, type) { + const url = `${Config.CENTRAL_LEDGER_URL}/participants/Hub/accounts` + const body = { + currency, + type + } + return axios.post(url, body) +} + +async function addParticipant (currency, fspName) { + const url = `${Config.CENTRAL_LEDGER_URL}/participants` + return axios.post(url, { + name: fspName, + currency + }) +} + +async function addParticipantEndpoint (participant, endpointType, endpoint) { + const url = `${Config.CENTRAL_LEDGER_URL}/participants/${participant}/endpoints` + const body = { + type: endpointType, + value: endpoint + } + return axios.post(url, body) +} + +async function createNetDebitCapInitialPositionAndLimit (participant, initialPosition, currency, limitValue) { + const url = `${Config.CENTRAL_LEDGER_URL}/participants/${participant}/initialPositionAndLimits` + return axios.post(url, { + currency, + limit: { + type: 'NET_DEBIT_CAP', + value: limitValue + }, + initialPosition: initialPosition + }) +} + +async function sendTransfer (payerFsp, payeeFsp, transfer) { + const url = `${Config.ML_API_ADAPTER_URL}/transfers` + const currentDateGMT = new Date().toGMTString() + const expirationDate = new Date((new Date()).getTime() + (24 * 60 * 60 * 1000)) + + const headers = { + Accept: 'application/vnd.interoperability.transfers+json;version=1.0', + 'Content-Type': 'application/vnd.interoperability.transfers+json;version=1.0', + Date: currentDateGMT, + 'FSPIOP-Source': payerFsp, + 'FSPIOP-Destination': payeeFsp + } + const body = { + transferId: transfer.transferId, + payerFsp, + payeeFsp, + amount: transfer.amount, + ilpPacket: transfer.ilpPacket, + condition: transfer.ilpCondition, + expiration: expirationDate.toISOString(), + extensionList: { + extension: [{ + key: 'prepare', + value: 'description' + }] + } + } + return axios.post(url, body, { + headers: headers + }) +} + +async function waitForTransferToBeCommited (transferId, sleepMs, iterations) { + const localEnum = { + transferStates: { + COMMITTED: 'COMMITTED' + } + } + const url = `${Config.SIMULATOR_HOST_URL}/${transferId}` + for (let i = 0; i < iterations; i++) { + Logger.info(`Waiting for transfer ${transferId} to be committed...`) + try { + const simulatorResponse = await axios.get(url) + if (simulatorResponse.data && simulatorResponse.data.transferState === localEnum.transferStates.COMMITTED) { + return + } + } catch (err) { + if (err.type === 'invalid-json') { + Logger.info(`Transfer not processed yet. Awaiting ${sleepMs} ms...`) + } else { + Logger.info(err.message) + throw err + } + } + await Utils.sleep(sleepMs) + } + throw new Error('Transfer did not commit in time') +} + +module.exports = { + addParticipant, + addParticipantEndpoint, + createNetDebitCapInitialPositionAndLimit, + createParticipantAccount, + createSettlementModel, + getParticipantAccount, + sendTransfer, + waitForTransferToBeCommited +} diff --git a/test/integration/helpers/models.js b/test/integration/helpers/models.js index 46e58c85..aace0227 100644 --- a/test/integration/helpers/models.js +++ b/test/integration/helpers/models.js @@ -33,6 +33,9 @@ module.exports = { settlementModel: { create: async (record) => { return Db.settlementModel.insert(record) + }, + truncate: async (record) => { + return Db.settlementModel.truncate() } }, settlementWindowContent: { diff --git a/test/integration/helpers/transferData.js b/test/integration/helpers/transferData.js index 8206654e..a30a8dcf 100644 --- a/test/integration/helpers/transferData.js +++ b/test/integration/helpers/transferData.js @@ -83,8 +83,8 @@ module.exports = { amount: (10 + Math.floor(Math.random() * 9000) / 100).toString().substr(0, 5), // transfer amount between 10.00 and 100 currency }, - ilpPacket: 'AYIC9AAAAAAAABdwHWcucGF5ZWVmc3AubXNpc2RuLjIyNTU2OTk5MTI1ggLKZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pTXpFek16SmtNamN0TnpRM1lpMDBPVGs1TFRnd09USXROak01T1dJM1pEa3hZakU0SWl3aWNYVnZkR1ZKWkNJNkltUTVZVEZqT1RWa0xUUmxaall0TkdFeU5DMWhObU5pTFdJek5HSTFPRFEzT1RNeU1pSXNJbkJoZVdWbElqcDdJbkJoY25SNVNXUkpibVp2SWpwN0luQmhjblI1U1dSVWVYQmxJam9pVFZOSlUwUk9JaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pTWpJMU5UWTVPVGt4TWpVaUxDSm1jM0JKWkNJNkluQmhlV1ZsWm5Od0luMTlMQ0p3WVhsbGNpSTZleUp3WVhKMGVVbGtTVzVtYnlJNmV5SndZWEowZVVsa1ZIbHdaU0k2SWsxVFNWTkVUaUlzSW5CaGNuUjVTV1JsYm5ScFptbGxjaUk2SWpJeU5UQTNNREE0TVRneElpd2labk53U1dRaU9pSndZWGxsY21aemNDSjlMQ0p3WlhKemIyNWhiRWx1Wm04aU9uc2lZMjl0Y0d4bGVFNWhiV1VpT25zaVptbHljM1JPWVcxbElqb2lUV0YwY3lJc0lteGhjM1JPWVcxbElqb2lTR0ZuYldGdUluMHNJbVJoZEdWUFprSnBjblJvSWpvaU1UazRNeTB4TUMweU5TSjlmU3dpWVcxdmRXNTBJanA3SW1GdGIzVnVkQ0k2SWpZd0lpd2lZM1Z5Y21WdVkza2lPaUpWVTBRaWZTd2lkSEpoYm5OaFkzUnBiMjVVZVhCbElqcDdJbk5qWlc1aGNtbHZJam9pVkZKQlRsTkdSVklpTENKcGJtbDBhV0YwYjNJaU9pSlFRVmxGVWlJc0ltbHVhWFJwWVhSdmNsUjVjR1VpT2lKRFQwNVRWVTFGVWlKOWZRAA', - ilpCondition: 'u1cSTBLEZ03awvrLHWaQjCnd3GAB9_17Y2WhGdvepjk' + ilpPacket: 'AQAAAAAAAADIEHByaXZhdGUucGF5ZWVmc3CCAiB7InRyYW5zYWN0aW9uSWQiOiIyZGY3NzRlMi1mMWRiLTRmZjctYTQ5NS0yZGRkMzdhZjdjMmMiLCJxdW90ZUlkIjoiMDNhNjA1NTAtNmYyZi00NTU2LThlMDQtMDcwM2UzOWI4N2ZmIiwicGF5ZWUiOnsicGFydHlJZEluZm8iOnsicGFydHlJZFR5cGUiOiJNU0lTRE4iLCJwYXJ0eUlkZW50aWZpZXIiOiIyNzcxMzgwMzkxMyIsImZzcElkIjoicGF5ZWVmc3AifSwicGVyc29uYWxJbmZvIjp7ImNvbXBsZXhOYW1lIjp7fX19LCJwYXllciI6eyJwYXJ0eUlkSW5mbyI6eyJwYXJ0eUlkVHlwZSI6Ik1TSVNETiIsInBhcnR5SWRlbnRpZmllciI6IjI3NzEzODAzOTExIiwiZnNwSWQiOiJwYXllcmZzcCJ9LCJwZXJzb25hbEluZm8iOnsiY29tcGxleE5hbWUiOnt9fX0sImFtb3VudCI6eyJjdXJyZW5jeSI6IlVTRCIsImFtb3VudCI6IjIwMCJ9LCJ0cmFuc2FjdGlvblR5cGUiOnsic2NlbmFyaW8iOiJERVBPU0lUIiwic3ViU2NlbmFyaW8iOiJERVBPU0lUIiwiaW5pdGlhdG9yIjoiUEFZRVIiLCJpbml0aWF0b3JUeXBlIjoiQ09OU1VNRVIiLCJyZWZ1bmRJbmZvIjp7fX19', + ilpCondition: 'HOr22-H3AfTDHrSkPjJtVPRdKouuMkDXTR4ejlQa8Ks' }) } const localEnum = { diff --git a/test/integration/helpers/utils.js b/test/integration/helpers/utils.js new file mode 100644 index 00000000..9d280341 --- /dev/null +++ b/test/integration/helpers/utils.js @@ -0,0 +1,40 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Claudio Viola + -------------- + ******/ +'use strict' + +function rand8 () { + return Math.floor(Math.random() * 1000000000) +} + +async function sleep (ms) { + return new Promise(resolve => { + setTimeout(resolve, ms) + }) +} + +module.exports = { + rand8, + sleep +} diff --git a/test/integration/settlementTransfer b/test/integration/settlementTransfer new file mode 100644 index 00000000..8865b187 --- /dev/null +++ b/test/integration/settlementTransfer @@ -0,0 +1,665 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Georgi Georgiev + -------------- + ******/ +'use strict' + +const Test = require('tapes')(require('tape')) +const Sinon = require('sinon') +const Logger = require('@mojaloop/central-services-logger') +const MLNumber = require('@mojaloop/ml-number') +const TransferData = require('./helpers/transferData') +const Models = require('./helpers/models') +const Config = require('../../src/lib/config') +const Db = require('../../src/lib/db') +const CLDb = require('@mojaloop/central-ledger/src/lib/db') +const SettlementWindowService = require('../../src/domain/settlementWindow') +const SettlementService = require('../../src/domain/settlement') +const Enums = require('../../src/models/lib/enums') +const SettlementWindowStateChangeModel = require('../../src/models/settlementWindow/settlementWindowStateChange') +const SettlementModel = require('../../src/models/settlement/settlement') +const SettlementModelModel = require('../../src/models/settlement/settlementModel') +const SettlementStateChangeModel = require('../../src/models/settlement/settlementStateChange') +const SettlementParticipantCurrencyModel = require('../../src/models/settlement/settlementParticipantCurrency') +const TransferModel = require('@mojaloop/central-ledger/src/models/transfer/transfer') +const TransferStateChangeModel = require('@mojaloop/central-ledger/src/models/transfer/transferStateChange') +const ParticipantPositionModel = require('@mojaloop/central-ledger/src/models/position/participantPosition') +const Producer = require('../../src/lib/kafka/producer') +const StreamProducer = require('@mojaloop/central-services-stream').Util.Producer +// require('leaked-handles').set({ fullStack: true, timeout: 5000, debugSockets: true }) + +const currency = 'USD' +let netSettlementSenderId +let netSenderAccountId +let netSettlementRecipientId +let netRecipientAccountId +let netSettlementAmount +let netSenderSettlementTransferId +let netRecipientSettlementTransferId + +const settlementModels = [ + { + name: 'DEFERRED_NET', + settlementGranularityId: 2, // NET + settlementInterchangeId: 2, // MULTILATERAL + settlementDelayId: 2, // DEFERRED + ledgerAccountTypeId: 1, // POSITION + autoPositionReset: true, + currencyId: null + }, + { + name: 'DEFERRED_NET_USD', + settlementGranularityId: 2, // NET + settlementInterchangeId: 2, // MULTILATERAL + settlementDelayId: 2, // DEFERRED + ledgerAccountTypeId: 1, // POSITION + autoPositionReset: true, + currencyId: 'USD' + } +] + +const getEnums = async () => { + return { + ledgerAccountTypes: await Enums.ledgerAccountTypes(), + ledgerEntryTypes: await Enums.ledgerEntryTypes(), + participantLimitTypes: await Enums.participantLimitTypes(), + settlementDelay: await Enums.settlementDelay(), + settlementGranularity: await Enums.settlementGranularity(), + settlementInterchange: await Enums.settlementInterchange(), + settlementStates: await Enums.settlementStates(), + settlementWindowStates: await Enums.settlementWindowStates(), + transferParticipantRoleTypes: await Enums.transferParticipantRoleTypes(), + transferStates: await Enums.transferStates() + } +} + +TransferData.setup() + +Test('SettlementTransfer should', async settlementTransferTest => { + await Db.connect(Config.DATABASE) + await CLDb.connect(Config.DATABASE) + + const enums = await getEnums() + let settlementWindowId + let settlementData + + let sandbox + settlementTransferTest.beforeEach(test => { + sandbox = Sinon.createSandbox() + test.end() + }) + settlementTransferTest.afterEach(test => { + sandbox.restore() + test.end() + }) + + await settlementTransferTest.test('init settlement models for integration testing:', async test => { + try { + for (const model of settlementModels) { + const record = await SettlementModelModel.getByName(model.name) + if (record && record.name === model.name) { + model.settlementModelId = record.settlementModelId + test.pass(`Settlement model ${model.name} already exists`) + } else { + const id = await Models.settlementModel.create(model) + const record1 = await SettlementModelModel.getByName(model.name) + if (record1 && record1.name === model.name && record1.settlementModelId === id) { + model.settlementModelId = id + test.pass(`Settlement model ${model.name} has been successfully inserted with id = ${id}`) + } else { + throw new Error(`Settlement model ${model.name} could not be instantiated`) + } + } + } + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('close the current window:', async test => { + try { + let params = { query: { state: enums.settlementWindowStates.OPEN } } + const res1 = await SettlementWindowService.getByParams(params) // method to be verified + settlementWindowId = res1[0].settlementWindowId + test.ok(settlementWindowId > 0, 'retrieve the OPEN window') + + params = { settlementWindowId: settlementWindowId, state: enums.settlementWindowStates.CLOSED, reason: 'text' } + const res2 = await SettlementWindowService.process(params, enums.settlementWindowStates) + const res3 = await SettlementWindowService.close(params.settlementWindowId, params.reason) + test.ok(res3, 'close settlement window operation success') + + const closedWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + const openWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(res2.settlementWindowId) + test.equal(closedWindow.settlementWindowStateId, enums.settlementWindowStates.CLOSED, `window id ${settlementWindowId} is CLOSED`) + test.equal(openWindow.settlementWindowStateId, enums.settlementWindowStates.OPEN, `window id ${res2.settlementWindowId} is OPEN`) + + for (const currency of TransferData.currencies) { + const settlementWindowContentData = await Models.settlementWindowContent.getByParams({ settlementWindowId, currencyId: currency }) + const id = settlementWindowContentData[0].settlementWindowContentId + test.equal(settlementWindowContentData.length, 1, `window content id ${id} has been created`) + test.equal(settlementWindowContentData[0].settlementId, null, `window content id ${id} has not been assigned to a settlement yet`) + + const settlementWindowContentStateChange = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(id) + test.equal(settlementWindowContentStateChange.settlementWindowStateId, 'CLOSED', `window content id ${id} state is CLOSED`) + test.equal(settlementWindowContentStateChange.settlementWindowContentStateChangeId, settlementWindowContentData[0].currentStateChangeId, 'state pointer is up-to-date') + + const settlementContentAggregationData = await Models.settlementWindowContentAggregation.getBySettlementWindowContentId(id) + test.ok(settlementContentAggregationData.length > 0, `a total of ${settlementContentAggregationData.length} content aggregation records have been generated for window content ${id}`) + for (const sca of settlementContentAggregationData) { + test.equal(sca.currentStateId, 'CLOSED', `content aggregation id ${sca.settlementContentAggregationId} state is CLOSED`) + test.equal(sca.settlementId, null, `content aggregation id ${sca.settlementContentAggregationId} has not been assigned to a settlement yet`) + } + } + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('create a settlement:', async test => { + try { + const params = { + settlementModel: settlementModels[1].name, + reason: 'reason', + settlementWindows: [ + { + id: settlementWindowId + } + ] + } + settlementData = await SettlementService.settlementEventTrigger(params, enums) // method to be verified + test.ok(settlementData, 'settlementEventTrigger operation success') + + const sId = settlementData.id + test.equal(settlementData.settlementWindows.length, 1, `settlement id ${sId} holds one window`) + test.ok(settlementData.settlementWindows[0].content.length > 0, 'settlement window has content') + test.equal(settlementData.settlementWindows[0].content[0].state, 'PENDING_SETTLEMENT', 'settlement window content state is PENDING_SETTLEMENT') + + const swcId = settlementData.settlementWindows[0].content[0].id + const settlementWindowContent = await Models.settlementWindowContent.getById(swcId) + test.equal(settlementWindowContent.settlementId, settlementData.id, `window content id ${swcId} has been assigned to settlement id ${sId}`) + + const settlementWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + test.equal(settlementWindow.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, `window id ${settlementWindowId} is PENDING_SETTLEMENT`) + + const settlement = await SettlementModel.getById(settlementData.id) + test.ok(settlement, `create settlement with id ${settlementData.id}`) + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.PENDING_SETTLEMENT, 'settlement state is PENDING_SETTLEMENT') + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('PS_TRANSFERS_RECORDED for PAYER:', async test => { + try { + // read and store settlement participant and account data needed in remaining tests + let participantFilter = settlementData.participants.filter(participant => { + return participant.accounts.find(account => { + if (account.netSettlementAmount.currency === currency && account.netSettlementAmount.amount > 0) { + netSenderAccountId = account.id + netSettlementAmount = account.netSettlementAmount.amount + return true + } + return false + }) + }) + netSettlementSenderId = participantFilter[0].id + participantFilter = settlementData.participants.filter(participant => { + return participant.accounts.find(account => { + if (account.netSettlementAmount.currency === currency && account.netSettlementAmount.amount < 0) { + netRecipientAccountId = account.id + return true + } + return false + }) + }) + netSettlementRecipientId = participantFilter[0].id + // data retrieved and stored into module scope variables + + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: 'Transfers recorded for payer', + state: enums.settlementStates.PS_TRANSFERS_RECORDED + } + ] + } + ] + } + const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified + test.ok(res, 'settlement putById operation successful') + + const settlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(settlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, 'record for payer changed to PS_TRANSFERS_RECORDED') + + netSenderSettlementTransferId = settlementParticipantCurrencyRecord.settlementTransferId + + const transferRecord = await TransferModel.getById(netSenderSettlementTransferId) + test.ok(transferRecord, 'settlement transfer is created for payer') + + const transferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) + test.equal(transferStateChangeRecord.transferStateId, enums.transferStates.RECEIVED_PREPARE, 'settlement transfer for payer is RECEIVED_PREPARE') + + const transferParticipantRecords = await Models.getTransferParticipantsByTransferId(netSenderSettlementTransferId) + const hubTransferParticipant = transferParticipantRecords.find(record => { + return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.HUB + }) + const payerTransferParticipant = transferParticipantRecords.find(record => { + return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.DFSP_POSITION + }) + test.ok(payerTransferParticipant.amount < 0, `DR settlement transfer for SETTLEMENT_NET_SENDER is negative for payer ${payerTransferParticipant.amount}`) + test.ok(hubTransferParticipant.amount > 0, `CR settlement transfer for SETTLEMENT_NET_SENDER is positive for hub ${hubTransferParticipant.amount}`) + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('PS_TRANSFERS_RECORDED for PAYEE:', async test => { + try { + const externalReferenceSample = 'tr0123456789' + const params = { + participants: [ + { + id: netSettlementRecipientId, + accounts: [ + { + id: netRecipientAccountId, + reason: 'Transfers recorded for payee', + state: enums.settlementStates.PS_TRANSFERS_RECORDED, + externalReference: externalReferenceSample + } + ] + } + ] + } + const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified + test.ok(res, 'settlement putById operation successful') + + const settlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) + test.equal(settlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, 'record for payee changed to PS_TRANSFERS_RECORDED') + test.equal(settlementParticipantCurrencyRecord.externalReference, externalReferenceSample, 'external reference is recorded') + + netRecipientSettlementTransferId = settlementParticipantCurrencyRecord.settlementTransferId + const transferRecord = await TransferModel.getById(netRecipientSettlementTransferId) + test.ok(transferRecord, 'settlement transfer is created for payee') + + const transferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) + test.equal(transferStateChangeRecord.transferStateId, enums.transferStates.RECEIVED_PREPARE, 'settlement transfer for payee is RECEIVED_PREPARE') + + const transferParticipantRecords = await Models.getTransferParticipantsByTransferId(netRecipientSettlementTransferId) + const hubTransferParticipant = transferParticipantRecords.find(record => { + return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.HUB + }) + const payeeTransferParticipant = transferParticipantRecords.find(record => { + return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.DFSP_POSITION + }) + test.ok(hubTransferParticipant.amount < 0, `DR settlement transfer for SETTLEMENT_NET_RECIPIENT is negative for hub ${hubTransferParticipant.amount}`) + test.ok(payeeTransferParticipant.amount > 0, `CR settlement transfer for SETTLEMENT_NET_RECIPIENT is positive for payer ${payeeTransferParticipant.amount}`) + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, 'settlement state is PS_TRANSFERS_RECORDED') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('PS_TRANSFERS_RESERVED for PAYER & PAYEE:', async test => { + try { + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: 'Transfers reserved for payer & payee', + state: enums.settlementStates.PS_TRANSFERS_RESERVED + } + ] + }, + { + id: netSettlementRecipientId, + accounts: [ + { + id: netRecipientAccountId, + reason: 'Transfers reserved for payer & payee', + state: enums.settlementStates.PS_TRANSFERS_RESERVED + } + ] + } + ] + } + const initialPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value + const initialPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value + + const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified + test.ok(res, 'settlement putById operation successful') + + const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, 'record for payer changed to PS_TRANSFERS_RESERVED') + + const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) + test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, 'record for payee changed to PS_TRANSFERS_RESERVED') + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, 'settlement state is PS_TRANSFERS_RESERVED') + + const payerTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) + test.equal(payerTransferStateChangeRecord.transferStateId, enums.transferStates.RESERVED, 'settlement transfer for payer is RESERVED') + + const payeeTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) + test.equal(payeeTransferStateChangeRecord.transferStateId, enums.transferStates.RESERVED, 'settlement transfer for payee is RESERVED') + + const currentPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value + test.equal(currentPayerPosition, initialPayerPosition, 'position for NET_SETTLEMENT_SENDER is not changed') + + const currentPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value + test.equal(currentPayeePosition, new MLNumber(initialPayeePosition).add(netSettlementAmount).toNumber(), 'position for NET_SETTLEMENT_RECIPIENT is adjusted') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('PS_TRANSFERS_COMMITTED for PAYER & PAYEE:', async test => { + try { + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: 'Transfers committed for payer & payee', + state: enums.settlementStates.PS_TRANSFERS_COMMITTED + } + ] + }, + { + id: netSettlementRecipientId, + accounts: [ + { + id: netRecipientAccountId, + reason: 'Transfers committed for payer & payee', + state: enums.settlementStates.PS_TRANSFERS_COMMITTED + } + ] + } + ] + } + const initialPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value + const initialPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value + + const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified + test.ok(res, 'settlement putById operation successful') + + const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, 'record for payer changed to PS_TRANSFERS_COMMITTED') + + const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) + test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, 'record for payee changed to PS_TRANSFERS_COMMITTED') + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, 'settlement state is PS_TRANSFERS_COMMITTED') + + const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, 'window is still PENDING_SETTLEMENT') + + const payerTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) + test.equal(payerTransferStateChangeRecord.transferStateId, enums.transferStates.COMMITTED, 'settlement transfer for payer is COMMITTED') + + const payeeTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) + test.equal(payeeTransferStateChangeRecord.transferStateId, enums.transferStates.COMMITTED, 'settlement transfer for payee is COMMITTED') + + const currentPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value + test.equal(currentPayerPosition, initialPayerPosition - netSettlementAmount, 'position for NET_SETTLEMENT_SENDER is adjusted') + + const currentPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value + test.equal(currentPayeePosition, initialPayeePosition, 'position for NET_SETTLEMENT_RECIPIENT is unchanged') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('SETTLED for PAYER', async test => { + try { + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: 'Transfers settled for payer', + state: enums.settlementStates.SETTLED + } + ] + } + ] + } + + const res = await SettlementService.putById(settlementData.id, params, enums) + test.ok(res, 'settlement putById operation successful') + + const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.SETTLED, 'record for payer changed to SETTLED') + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLING, 'settlement state is SETTLING') + + const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, 'window is still PENDING_SETTLEMENT') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('update SETTLED for PAYER with external reference', async test => { + try { + const externalReferenceSample = 'tr98765432109876543210' + const reasonSample = 'Additional reason for SETTLED account' + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: reasonSample, + state: enums.settlementStates.SETTLED, + externalReference: externalReferenceSample + } + ] + } + ] + } + + const res = await SettlementService.putById(settlementData.id, params, enums) + test.ok(res, 'settlement putById operation successful') + + const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(payerSettlementParticipantCurrencyRecord.reason, reasonSample, 'Reason recorded') + test.equal(payerSettlementParticipantCurrencyRecord.externalReference, externalReferenceSample, 'External reference recorded') + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('SETTLED for PAYEE', async test => { + try { + const params = { + participants: [ + { + id: netSettlementRecipientId, + accounts: [ + { + id: netRecipientAccountId, + reason: 'Payee: SETTLED, settlement: SETTLED', + state: enums.settlementStates.SETTLED + } + ] + } + ] + } + + const res = await SettlementService.putById(settlementData.id, params, enums) + test.ok(res, 'settlement putById operation successful') + + const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) + test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.SETTLED, 'record for payee changed to SETTLED') + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLED, 'settlement state is SETTLED') + + const windowContentState = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(res.settlementWindows[0].content[0].id) + test.equal(windowContentState.settlementWindowStateId, 'SETTLED', 'settlement window content state is SETTLED') + + const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, 'window is PENDING_SETTLEMENT because there is more window content to settle') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('create a settlement with previous window remaining content and settle it:', async test => { + try { + const settlementStates = [enums.settlementStates.PS_TRANSFERS_RECORDED, enums.settlementStates.PS_TRANSFERS_RESERVED, enums.settlementStates.PS_TRANSFERS_COMMITTED, enums.settlementStates.SETTLED] + + let params = { + settlementModel: settlementModels[0].name, + reason: 'reason', + settlementWindows: [ + { + id: settlementWindowId + } + ] + } + settlementData = await SettlementService.settlementEventTrigger(params, enums) + test.ok(settlementData, 'settlementEventTrigger operation success') + + let res + for (const state of settlementStates) { + params = { + participants: [ + { + id: settlementData.participants[0].id, + accounts: [ + { + id: settlementData.participants[0].accounts[0].id, + reason: `Settlement to ${state} state`, + state + } + ] + }, + { + id: settlementData.participants[1].id, + accounts: [ + { + id: settlementData.participants[1].accounts[0].id, + reason: `Settlement to ${state} state`, + state + } + ] + } + ] + } + res = await SettlementService.putById(settlementData.id, params, enums) + test.ok(res, `settlement putById operation success for ${state} state`) + } + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLED, 'settlement state is SETTLED') + + const windowContentState = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(res.settlementWindows[0].content[0].id) + test.equal(windowContentState.settlementWindowStateId, 'SETTLED', 'settlement window content state is SETTLED') + + const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(res.settlementWindows[0].id) + test.equal(window.settlementWindowStateId, enums.settlementWindowStates.SETTLED, 'window is SETTLED because there is no more window content to settle') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('finally disconnect open handles', async test => { + try { + await Db.disconnect() + await CLDb.disconnect() + test.pass('database connection closed') + await Producer.getProducer('topic-notification-event').disconnect() + test.pass('producer to topic-notification-event disconnected') + await StreamProducer.getProducer('topic-settlementwindow-close').disconnect() + test.pass('producer to topic-settlementwindow-close disconnected') + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + settlementTransferTest.end() +}) diff --git a/test/integration/settlement_deferred_net_scenario/settlementTransfer.test.js b/test/integration/settlement_deferred_net_scenario/settlementTransfer.test.js new file mode 100644 index 00000000..26ccc3ce --- /dev/null +++ b/test/integration/settlement_deferred_net_scenario/settlementTransfer.test.js @@ -0,0 +1,638 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Georgi Georgiev + -------------- + ******/ +'use strict' + +const Test = require('tapes')(require('tape')) +const Sinon = require('sinon') +const Logger = require('@mojaloop/central-services-logger') +const MLNumber = require('@mojaloop/ml-number') +const SettlementTransferData = require('./settlementTransferData') +const Models = require('../helpers/models') +const Config = require('../../../src/lib/config') +const Db = require('../../../src/lib/db') +const CLDb = require('@mojaloop/central-ledger/src/lib/db') +const SettlementWindowService = require('../../../src/domain/settlementWindow') +const SettlementService = require('../../../src/domain/settlement') +const Enums = require('../../../src/models/lib/enums') +const SettlementWindowStateChangeModel = require('../../../src/models/settlementWindow/settlementWindowStateChange') +const SettlementModel = require('../../../src/models/settlement/settlement') +const SettlementStateChangeModel = require('../../../src/models/settlement/settlementStateChange') +const SettlementParticipantCurrencyModel = require('../../../src/models/settlement/settlementParticipantCurrency') +const TransferStateChangeModel = require('@mojaloop/central-ledger/src/models/transfer/transferStateChange') +const ParticipantPositionModel = require('@mojaloop/central-ledger/src/models/position/participantPosition') +const Producer = require('../../../src/lib/kafka/producer') +const StreamProducer = require('@mojaloop/central-services-stream').Util.Producer +const TransferModel = require('@mojaloop/central-ledger/src/models/transfer/transfer') + +// require('leaked-handles').set({ fullStack: true, timeout: 5000, debugSockets: true }) + +const currency = 'USD' +let netSettlementSenderId +let netSenderAccountId +let netSettlementRecipientId +let netRecipientAccountId +let netSettlementAmount +let netSenderSettlementTransferId +let netRecipientSettlementTransferId + +const settlementModels = [ + { + name: 'DEFERREDNETTZS', + settlementGranularityId: 2, // NET + settlementInterchangeId: 2, // MULTILATERAL + settlementDelayId: 2, // DEFERRED + ledgerAccountTypeId: 1, // POSITION + autoPositionReset: true, + currencyId: 'TZS' + }, + { + name: 'DEFERREDNETUSD', + settlementGranularityId: 2, // NET + settlementInterchangeId: 2, // MULTILATERAL + settlementDelayId: 2, // DEFERRED + ledgerAccountTypeId: 1, // POSITION + autoPositionReset: true, + currencyId: 'USD' + } +] + +const getEnums = async () => { + return { + ledgerAccountTypes: await Enums.ledgerAccountTypes(), + ledgerEntryTypes: await Enums.ledgerEntryTypes(), + participantLimitTypes: await Enums.participantLimitTypes(), + settlementDelay: await Enums.settlementDelay(), + settlementGranularity: await Enums.settlementGranularity(), + settlementInterchange: await Enums.settlementInterchange(), + settlementStates: await Enums.settlementStates(), + settlementWindowStates: await Enums.settlementWindowStates(), + transferParticipantRoleTypes: await Enums.transferParticipantRoleTypes(), + transferStates: await Enums.transferStates() + } +} + +Test('SettlementTransfer should', async settlementTransferTest => { + await Db.connect(Config.DATABASE) + await CLDb.connect(Config.DATABASE) + await SettlementTransferData.init() + const enums = await getEnums() + let settlementWindowId + let settlementData + + let sandbox + settlementTransferTest.beforeEach(test => { + sandbox = Sinon.createSandbox() + test.end() + }) + settlementTransferTest.afterEach(test => { + sandbox.restore() + test.end() + }) + + await settlementTransferTest.test('close the current window:', async test => { + try { + let params = { query: { state: enums.settlementWindowStates.OPEN } } + const res1 = await SettlementWindowService.getByParams(params) // method to be verified + settlementWindowId = res1[0].settlementWindowId + test.ok(settlementWindowId > 0, '#1 retrieve the OPEN window') + + params = { settlementWindowId: settlementWindowId, state: enums.settlementWindowStates.CLOSED, reason: 'text' } + const res2 = await SettlementWindowService.process(params, enums.settlementWindowStates) + const res3 = await SettlementWindowService.close(params.settlementWindowId, params.reason) + test.ok(res3, '#2 close settlement window operation success') + + const closedWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + const openWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(res2.settlementWindowId) + test.equal(closedWindow.settlementWindowStateId, enums.settlementWindowStates.CLOSED, `#3 window id ${settlementWindowId} is CLOSED`) + test.equal(openWindow.settlementWindowStateId, enums.settlementWindowStates.OPEN, `#4 window id ${res2.settlementWindowId} is OPEN`) + + for (const currency of SettlementTransferData.currencies) { + const settlementWindowContentData = await Models.settlementWindowContent.getByParams({ settlementWindowId, currencyId: currency }) + const id = settlementWindowContentData[0].settlementWindowContentId + test.equal(settlementWindowContentData.length, 1, `#5 window content id ${id} has been created`) + test.equal(settlementWindowContentData[0].settlementId, null, `#6 window content id ${id} has not been assigned to a settlement yet`) + + const settlementWindowContentStateChange = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(id) + test.equal(settlementWindowContentStateChange.settlementWindowStateId, 'CLOSED', `#7 window content id ${id} state is CLOSED`) + test.equal(settlementWindowContentStateChange.settlementWindowContentStateChangeId, settlementWindowContentData[0].currentStateChangeId, '#8 state pointer is up-to-date') + + const settlementContentAggregationData = await Models.settlementWindowContentAggregation.getBySettlementWindowContentId(id) + test.ok(settlementContentAggregationData.length > 0, `#9 a total of ${settlementContentAggregationData.length} content aggregation records have been generated for window content ${id}`) + for (const sca of settlementContentAggregationData) { + test.equal(sca.currentStateId, 'CLOSED', `#10 content aggregation id ${sca.settlementContentAggregationId} state is CLOSED`) + test.equal(sca.settlementId, null, `#11 content aggregation id ${sca.settlementContentAggregationId} has not been assigned to a settlement yet`) + } + } + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('create a settlement:', async test => { + try { + const params = { + settlementModel: settlementModels[1].name, + reason: 'reason', + settlementWindows: [ + { + id: settlementWindowId + } + ] + } + settlementData = await SettlementService.settlementEventTrigger(params, enums) // method to be verified + test.ok(settlementData, '#12 settlementEventTrigger operation success') + + const sId = settlementData.id + test.equal(settlementData.settlementWindows.length, 1, `#13 settlement id ${sId} holds one window`) + test.ok(settlementData.settlementWindows[0].content.length > 0, '#14 settlement window has content') + test.equal(settlementData.settlementWindows[0].content[0].state, 'PENDING_SETTLEMENT', '#15settlement window content state is PENDING_SETTLEMENT') + + const swcId = settlementData.settlementWindows[0].content[0].id + const settlementWindowContent = await Models.settlementWindowContent.getById(swcId) + test.equal(settlementWindowContent.settlementId, settlementData.id, `#16 window content id ${swcId} has been assigned to settlement id ${sId}`) + + const settlementWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + test.equal(settlementWindow.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, `#17 window id ${settlementWindowId} is PENDING_SETTLEMENT`) + + const settlement = await SettlementModel.getById(settlementData.id) + test.ok(settlement, `#18 create settlement with id ${settlementData.id}`) + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.PENDING_SETTLEMENT, '#19 settlement state is PENDING_SETTLEMENT') + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('PS_TRANSFERS_RECORDED for PAYER:', async test => { + try { + // read and store settlement participant and account data needed in remaining tests + let participantFilter = settlementData.participants.filter(participant => { + return participant.accounts.find(account => { + if (account.netSettlementAmount.currency === currency && account.netSettlementAmount.amount > 0) { + netSenderAccountId = account.id + netSettlementAmount = account.netSettlementAmount.amount + return true + } else { + return false + } + }) + }) + netSettlementSenderId = participantFilter[0].id + participantFilter = settlementData.participants.filter(participant => { + return participant.accounts.find(account => { + if (account.netSettlementAmount.currency === currency && account.netSettlementAmount.amount < 0) { + netRecipientAccountId = account.id + return true + } else { + return false + } + }) + }) + netSettlementRecipientId = participantFilter[0].id + // data retrieved and stored into module scope variables + + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: 'Transfers recorded for payer', + state: enums.settlementStates.PS_TRANSFERS_RECORDED + } + ] + } + ] + } + const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified + test.ok(res, '#20 settlement putById operation successful') + + const settlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(settlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, '#21 record for payer changed to PS_TRANSFERS_RECORDED') + + netSenderSettlementTransferId = settlementParticipantCurrencyRecord.settlementTransferId + const transferRecord = await TransferModel.getById(netSenderSettlementTransferId) + test.ok(transferRecord, '#22 settlement transfer is created for payer') + + const transferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) + test.equal(transferStateChangeRecord.transferStateId, enums.transferStates.RECEIVED_PREPARE, '#23 settlement transfer for payer is RECEIVED_PREPARE') + + const transferParticipantRecords = await Models.getTransferParticipantsByTransferId(netSenderSettlementTransferId) + const hubTransferParticipant = transferParticipantRecords.find(record => { + return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.HUB + }) + const payerTransferParticipant = transferParticipantRecords.find(record => { + return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.DFSP_POSITION + }) + test.ok(payerTransferParticipant.amount < 0, `#24 DR settlement transfer for SETTLEMENT_NET_SENDER is negative for payer ${payerTransferParticipant.amount}`) + test.ok(hubTransferParticipant.amount > 0, `#25 CR settlement transfer for SETTLEMENT_NET_SENDER is positive for hub ${hubTransferParticipant.amount}`) + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('PS_TRANSFERS_RECORDED for PAYEE:', async test => { + try { + const externalReferenceSample = 'tr0123456789' + const params = { + participants: [ + { + id: netSettlementRecipientId, + accounts: [ + { + id: netRecipientAccountId, + reason: 'Transfers recorded for payee', + state: enums.settlementStates.PS_TRANSFERS_RECORDED, + externalReference: externalReferenceSample + } + ] + } + ] + } + const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified + test.ok(res, '#26 settlement putById operation successful') + + const settlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) + test.equal(settlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, '#27 record for payee changed to PS_TRANSFERS_RECORDED') + test.equal(settlementParticipantCurrencyRecord.externalReference, externalReferenceSample, '#28 external reference is recorded') + + netRecipientSettlementTransferId = settlementParticipantCurrencyRecord.settlementTransferId + const transferRecord = await TransferModel.getById(netRecipientSettlementTransferId) + test.ok(transferRecord, '#29 settlement transfer is created for payee') + + const transferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) + test.equal(transferStateChangeRecord.transferStateId, enums.transferStates.RECEIVED_PREPARE, '#30 settlement transfer for payee is RECEIVED_PREPARE') + + const transferParticipantRecords = await Models.getTransferParticipantsByTransferId(netRecipientSettlementTransferId) + const hubTransferParticipant = transferParticipantRecords.find(record => { + return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.HUB + }) + const payeeTransferParticipant = transferParticipantRecords.find(record => { + return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.DFSP_POSITION + }) + test.ok(hubTransferParticipant.amount < 0, `#31 DR settlement transfer for SETTLEMENT_NET_RECIPIENT is negative for hub ${hubTransferParticipant.amount}`) + test.ok(payeeTransferParticipant.amount > 0, `#32 CR settlement transfer for SETTLEMENT_NET_RECIPIENT is positive for payer ${payeeTransferParticipant.amount}`) + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, '#33 settlement state is PS_TRANSFERS_RECORDED') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('PS_TRANSFERS_RESERVED for PAYER & PAYEE:', async test => { + try { + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: 'Transfers reserved for payer & payee', + state: enums.settlementStates.PS_TRANSFERS_RESERVED + } + ] + }, + { + id: netSettlementRecipientId, + accounts: [ + { + id: netRecipientAccountId, + reason: 'Transfers reserved for payer & payee', + state: enums.settlementStates.PS_TRANSFERS_RESERVED + } + ] + } + ] + } + const initialPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value + const initialPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value + + const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified + test.ok(res, '#34 settlement putById operation successful') + + const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, '#35 record for payer changed to PS_TRANSFERS_RESERVED') + + const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) + test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, '#36 record for payee changed to PS_TRANSFERS_RESERVED') + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, '#37 settlement state is PS_TRANSFERS_RESERVED') + + const payerTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) + test.equal(payerTransferStateChangeRecord.transferStateId, enums.transferStates.RESERVED, '#38 settlement transfer for payer is RESERVED') + + const payeeTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) + test.equal(payeeTransferStateChangeRecord.transferStateId, enums.transferStates.RESERVED, '#39 settlement transfer for payee is RESERVED') + + const currentPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value + test.equal(currentPayerPosition, initialPayerPosition, '#40 position for NET_SETTLEMENT_SENDER is not changed') + + const currentPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value + test.equal(currentPayeePosition, new MLNumber(initialPayeePosition).add(netSettlementAmount).toNumber(), '#41 position for NET_SETTLEMENT_RECIPIENT is adjusted') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('PS_TRANSFERS_COMMITTED for PAYER & PAYEE:', async test => { + try { + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: 'Transfers committed for payer & payee', + state: enums.settlementStates.PS_TRANSFERS_COMMITTED + } + ] + }, + { + id: netSettlementRecipientId, + accounts: [ + { + id: netRecipientAccountId, + reason: 'Transfers committed for payer & payee', + state: enums.settlementStates.PS_TRANSFERS_COMMITTED + } + ] + } + ] + } + const initialPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value + const initialPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value + + const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified + test.ok(res, '#42 settlement putById operation successful') + + const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, '#43 record for payer changed to PS_TRANSFERS_COMMITTED') + + const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) + test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, '#44 record for payee changed to PS_TRANSFERS_COMMITTED') + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, '#45 settlement state is PS_TRANSFERS_COMMITTED') + + const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, '#46 window is still PENDING_SETTLEMENT') + + const payerTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) + test.equal(payerTransferStateChangeRecord.transferStateId, enums.transferStates.COMMITTED, '#47 settlement transfer for payer is COMMITTED') + + const payeeTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) + test.equal(payeeTransferStateChangeRecord.transferStateId, enums.transferStates.COMMITTED, '#48 settlement transfer for payee is COMMITTED') + + const currentPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value + test.equal(currentPayerPosition, initialPayerPosition - netSettlementAmount, '#49 position for NET_SETTLEMENT_SENDER is adjusted') + + const currentPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value + test.equal(currentPayeePosition, initialPayeePosition, '#50 position for NET_SETTLEMENT_RECIPIENT is unchanged') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('SETTLED for PAYER', async test => { + try { + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: 'Transfers settled for payer', + state: enums.settlementStates.SETTLED + } + ] + } + ] + } + + const res = await SettlementService.putById(settlementData.id, params, enums) + test.ok(res, 'settlement putById operation successful') + + const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.SETTLED, '#51 record for payer changed to SETTLED') + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLING, '#52 settlement state is SETTLING') + + const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, '#53 window is still PENDING_SETTLEMENT') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('update SETTLED for PAYER with external reference', async test => { + try { + const externalReferenceSample = 'tr98765432109876543210' + const reasonSample = 'Additional reason for SETTLED account' + const params = { + participants: [ + { + id: netSettlementSenderId, + accounts: [ + { + id: netSenderAccountId, + reason: reasonSample, + state: enums.settlementStates.SETTLED, + externalReference: externalReferenceSample + } + ] + } + ] + } + + const res = await SettlementService.putById(settlementData.id, params, enums) + test.ok(res, '#54 settlement putById operation successful') + + const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) + test.equal(payerSettlementParticipantCurrencyRecord.reason, reasonSample, '#55 Reason recorded') + test.equal(payerSettlementParticipantCurrencyRecord.externalReference, externalReferenceSample, '#56 External reference recorded') + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('SETTLED for PAYEE', async test => { + try { + const params = { + participants: [ + { + id: netSettlementRecipientId, + accounts: [ + { + id: netRecipientAccountId, + reason: 'Payee: SETTLED, settlement: SETTLED', + state: enums.settlementStates.SETTLED + } + ] + } + ] + } + + const res = await SettlementService.putById(settlementData.id, params, enums) + test.ok(res, '#57 settlement putById operation successful') + + const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) + test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.SETTLED, '#58 record for payee changed to SETTLED') + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLED, '#59 settlement state is SETTLED') + + const windowContentState = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(res.settlementWindows[0].content[0].id) + test.equal(windowContentState.settlementWindowStateId, 'SETTLED', '#60 settlement window content state is SETTLED') + + const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) + test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, '#61 window is PENDING_SETTLEMENT because there is more window content to settle') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('#62 create a settlement with previous window remaining content and settle it:', async test => { + try { + const settlementStates = [enums.settlementStates.PS_TRANSFERS_RECORDED, enums.settlementStates.PS_TRANSFERS_RESERVED, enums.settlementStates.PS_TRANSFERS_COMMITTED, enums.settlementStates.SETTLED] + + let params = { + settlementModel: settlementModels[0].name, + reason: 'reason', + settlementWindows: [ + { + id: settlementWindowId + } + ] + } + settlementData = await SettlementService.settlementEventTrigger(params, enums) + test.ok(settlementData, '#63 settlementEventTrigger operation success') + + let res + for (const state of settlementStates) { + params = { + participants: [ + { + id: settlementData.participants[0].id, + accounts: [ + { + id: settlementData.participants[0].accounts[0].id, + reason: `Settlement to ${state} state`, + state + } + ] + }, + { + id: settlementData.participants[1].id, + accounts: [ + { + id: settlementData.participants[1].accounts[0].id, + reason: `Settlement to ${state} state`, + state + } + ] + } + ] + } + res = await SettlementService.putById(settlementData.id, params, enums) + test.ok(res, `settlement putById operation success for ${state} state`) + } + + const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) + test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLED, '#64 settlement state is SETTLED') + + const windowContentState = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(res.settlementWindows[0].content[0].id) + test.equal(windowContentState.settlementWindowStateId, 'SETTLED', '#65 settlement window content state is SETTLED') + + const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(res.settlementWindows[0].id) + test.equal(window.settlementWindowStateId, enums.settlementWindowStates.SETTLED, '#66 window is SETTLED because there is no more window content to settle') + + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await settlementTransferTest.test('finally disconnect open handles', async test => { + try { + await Db.disconnect() + await CLDb.disconnect() + // test.pass('database connection closed') + await Producer.getProducer('topic-notification-event').disconnect() + test.pass('producer to topic-notification-event disconnected') + await StreamProducer.getProducer('topic-settlementwindow-close').disconnect() + test.pass('producer to topic-settlementwindow-close disconnected') + test.end() + } catch (err) { + Logger.error(`settlementTransferTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + settlementTransferTest.end() +}) diff --git a/test/integration/settlement_deferred_net_scenario/settlementTransferData.js b/test/integration/settlement_deferred_net_scenario/settlementTransferData.js new file mode 100644 index 00000000..f8104420 --- /dev/null +++ b/test/integration/settlement_deferred_net_scenario/settlementTransferData.js @@ -0,0 +1,214 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Georgi Georgiev + - Claudio Viola + -------------- + ******/ + +'use strict' + +const Config = require('../config') +const Logger = require('@mojaloop/central-services-logger') +const Uuid = require('uuid4') +const transferParticipantStateChangeService = require('../../../src/domain/transferSettlement') +const Api = require('../helpers/api') +const Db = require('../../../src/lib/db') +const Utils = require('../helpers/utils') + +const currencies = ['USD', 'TZS'] + +const settlementModels = [ + { + name: 'DEFERREDNETTZS', + settlementGranularity: 'NET', + settlementInterchange: 'MULTILATERAL', + settlementAccountType: 'SETTLEMENT', + settlementDelay: 'DEFERRED', + ledgerAccountType: 'POSITION', + autoPositionReset: true, + requireLiquidityCheck: true, + currency: 'TZS' + }, + { + name: 'DEFERREDNETUSD', + settlementGranularity: 'NET', + settlementInterchange: 'MULTILATERAL', + settlementAccountType: 'SETTLEMENT', + settlementDelay: 'DEFERRED', + ledgerAccountType: 'POSITION', + autoPositionReset: true, + currency: 'USD', + requireLiquidityCheck: true + } +] + +const payerFsp = `fsp${Utils.rand8()}` +const payeeFsp = `fsp${Utils.rand8()}` +const fspList = [ + { + fspName: payerFsp, + endpointBase: `${Config.SIMULATOR_URL}/payerfsp` + }, + { + fspName: payeeFsp, + endpointBase: `${Config.SIMULATOR_URL}/payeefsp` + } +] +const transfers = [] +for (const currency of currencies) { + transfers.push({ + transferId: Uuid(), + amount: { + amount: (10 + Math.floor(Math.random() * 9000) / 100).toString().substr(0, 5), // transfer amount between 10.00 and 100 + currency + }, + ilpPacket: 'AYIC9AAAAAAAABdwHWcucGF5ZWVmc3AubXNpc2RuLjIyNTU2OTk5MTI1ggLKZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pTXpFek16SmtNamN0TnpRM1lpMDBPVGs1TFRnd09USXROak01T1dJM1pEa3hZakU0SWl3aWNYVnZkR1ZKWkNJNkltUTVZVEZqT1RWa0xUUmxaall0TkdFeU5DMWhObU5pTFdJek5HSTFPRFEzT1RNeU1pSXNJbkJoZVdWbElqcDdJbkJoY25SNVNXUkpibVp2SWpwN0luQmhjblI1U1dSVWVYQmxJam9pVFZOSlUwUk9JaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pTWpJMU5UWTVPVGt4TWpVaUxDSm1jM0JKWkNJNkluQmhlV1ZsWm5Od0luMTlMQ0p3WVhsbGNpSTZleUp3WVhKMGVVbGtTVzVtYnlJNmV5SndZWEowZVVsa1ZIbHdaU0k2SWsxVFNWTkVUaUlzSW5CaGNuUjVTV1JsYm5ScFptbGxjaUk2SWpJeU5UQTNNREE0TVRneElpd2labk53U1dRaU9pSndZWGxsY21aemNDSjlMQ0p3WlhKemIyNWhiRWx1Wm04aU9uc2lZMjl0Y0d4bGVFNWhiV1VpT25zaVptbHljM1JPWVcxbElqb2lUV0YwY3lJc0lteGhjM1JPWVcxbElqb2lTR0ZuYldGdUluMHNJbVJoZEdWUFprSnBjblJvSWpvaU1UazRNeTB4TUMweU5TSjlmU3dpWVcxdmRXNTBJanA3SW1GdGIzVnVkQ0k2SWpZd0lpd2lZM1Z5Y21WdVkza2lPaUpWVTBRaWZTd2lkSEpoYm5OaFkzUnBiMjVVZVhCbElqcDdJbk5qWlc1aGNtbHZJam9pVkZKQlRsTkdSVklpTENKcGJtbDBhV0YwYjNJaU9pSlFRVmxGVWlJc0ltbHVhWFJwWVhSdmNsUjVjR1VpT2lKRFQwNVRWVTFGVWlKOWZRAA', + ilpCondition: 'u1cSTBLEZ03awvrLHWaQjCnd3GAB9_17Y2WhGdvepjk' + }) +} + +/** + * [init Initialise all the data required for running the scenario] + * @return {[type]} [description] + */ +async function init () { + Logger.info('Setting up initial data for settlement transfer test') + try { + Logger.info('Checking that hub accounts exist') + await checkHubAccountsExist() + + Logger.info('Initializing settlement models') + await initSettlementModels() + + Logger.info('Initializing participants') + await initParticipants() + Logger.info('Initializing participants endpoints') + + await initParticipantEndpoints() + Logger.info('Initializing participants net debit cap') + await initNetDebitCapPositionAndLimits() + Logger.info('Initializing transfers') + await initTransfers() + } catch (err) { + Logger.error(`Error setting up initial settlement data ${err}`) + process.exit(1) + } +} + +/** + * [initSettlementModels Initialize the settlement models required for the test] + * @return {[type]} [description] + */ +async function initSettlementModels () { + const knex = await Db.getKnex() + await knex.raw('SET FOREIGN_KEY_CHECKS = 0;') + await Db.settlementModel.truncate() + await knex.raw('SET FOREIGN_KEY_CHECKS = 1;') + await Api.createSettlementModel(settlementModels[0]) + await Api.createSettlementModel(settlementModels[1]) +} + +/** + * [checkHubAccountsExist Checks that the right hubs exist, if not create them] + * @return {[type]} [description] + */ +async function checkHubAccountsExist () { + for (const currency of currencies) { + const response = await Api.getParticipantAccount(currency) + let hubReconciliationAccountExists = false + let hubMLNSAccountExists = false + if (response && response.length) { + hubReconciliationAccountExists = response.findIndex(account => { + return account.ledgerAccountType === 'HUB_RECONCILIATION' + }) >= 0 + hubMLNSAccountExists = response.findIndex(account => { + return account.ledgerAccountType === 'HUB_MULTILATERAL_SETTLEMENT' + }) >= 0 + } + + if (hubReconciliationAccountExists === false) { + await Api.createParticipantAccount(currency, 'HUB_RECONCILIATION') + } + if (hubMLNSAccountExists === false) { + await Api.createParticipantAccount(currency, 'HUB_MULTILATERAL_SETTLEMENT') + } + } +} + +/** + * [initParticipants creates participants for the scenario test] + * @return {[Promise]} [description] + */ +async function initParticipants () { + for (const currency of currencies) { + for (const fsp of fspList) { + await Api.addParticipant(currency, fsp.fspName) + } + } +} + +/** + * [initNetDebitCapPositionAndLimits Initialize participant net debit cap and initial position for each currency] + * @return {[Promise]} [description] + */ +async function initNetDebitCapPositionAndLimits () { + for (const currency of currencies) { + for (const fsp of fspList) { + await Api.createNetDebitCapInitialPositionAndLimit(fsp.fspName, 0, currency, 1000) + } + } +} + +/** + * [initParticipantEndpoints Sets up participant endpoints] + * @return {[Promise]} [description] + */ +async function initParticipantEndpoints () { + for (const fsp of fspList) { + // reaching deadlock if doing promise.all + await Api.addParticipantEndpoint(fsp.fspName, 'FSPIOP_CALLBACK_URL_TRANSFER_POST', `${fsp.endpointBase}/transfers`) + await Api.addParticipantEndpoint(fsp.fspName, 'FSPIOP_CALLBACK_URL_TRANSFER_PUT', `${fsp.endpointBase}/transfers/{{transferId}}`) + await Api.addParticipantEndpoint(fsp.fspName, 'FSPIOP_CALLBACK_URL_TRANSFER_ERROR', `${fsp.endpointBase}/transfers/{{transferId}}/error`) + } +} + +/** + * [initTransfers Initiailize transfers for the settlement scenario] + * @return {[Promise]} [description] + */ +async function initTransfers () { + const SLEEP_MS = 1000 + for (const transfer of transfers) { + try { + await Api.sendTransfer(payerFsp, payeeFsp, transfer) + await Api.waitForTransferToBeCommited(transfer.transferId, SLEEP_MS, 10) + await transferParticipantStateChangeService.processMsgFulfil(transfer.transferId, 'success') + } catch (err) { + Logger.error(`prepareTransferDataTest failed with error - ${err}`) + } + } +} + +module.exports = { + currencies, + init +} diff --git a/test/unit/data/dummyFeeCalculationTestScript.js b/test/unit/data/dummyFeeCalculationTestScript.js new file mode 100644 index 00000000..887140b7 --- /dev/null +++ b/test/unit/data/dummyFeeCalculationTestScript.js @@ -0,0 +1,47 @@ +/* eslint-disable no-undef */ +// ******************************************************** +// Name: Interchange fee calculation +// Type: notification +// Action: commit +// Status: success +// Start: 2020-06-01T00:00:00.000Z +// End: 2100-12-31T23:59:59.999Z +// Description: This script calculates the interchange fees between DFSPs where the account type is "Wallet" +// ******************************************************** + +// ## Globals: +// payload: The contents of the message from the Kafka topic. +// transfer: The transfer object. + +// # Functions: +// ## Data retrieval functions: +// getTransfer(transferId): Retrieves a mojaloop transfer from the central-ledger API. + +// ## Helper functions: +// getExtensionValue(list, key): Gets a value from an extension list +// log(message): allows the script to log to standard out for debugging purposes + +// Math functions: +// multiply(number1, number2, decimalPlaces): Uses ml-number to handle multiplication of money values + +// Ledger functions: +// addLedgerEntry: Adds a debit and credit ledger entry to the specified account to the specified DFSPs + +log(JSON.stringify(transfer)) +const payerFspId = transfer.payer.partyIdInfo.fspId +const payeeFspId = transfer.payee.partyIdInfo.fspId + +if ((payeeFspId !== payerFspId) && + (getExtensionValue(transfer.payee.partyIdInfo.extensionList.extension, 'accountType') === 'Wallet' && + getExtensionValue(transfer.payer.partyIdInfo.extensionList.extension, 'accountType') === 'Wallet') && + (transfer.transactionType.scenario === 'TRANSFER' && + transfer.transactionType.initiator === 'PAYER' && + transfer.transactionType.initiatorType === 'CONSUMER')) { + log(`Adding an interchange fee for Wallet to Wallet from ${payerFspId} to ${payeeFspId}`) + addLedgerEntry(payload.id, 'INTERCHANGE_FEE', // Ledger account type Id + 'INTERCHANGE_FEE', // Ledger entry type Id + multiply(transfer.amount.amount, 0.006, 2), + transfer.amount.currency, + payerFspId, + payeeFspId) +} diff --git a/test/unit/data/interchangeCalculationTestScript.js b/test/unit/data/interchangeCalculationTestScript.js new file mode 100644 index 00000000..bca812d1 --- /dev/null +++ b/test/unit/data/interchangeCalculationTestScript.js @@ -0,0 +1,61 @@ +// ******************************************************** +// Name: Interchange fee calculation +// Type: notification +// Action: commit +// Status: success +// Start: 2020-06-01T00:00:00.000Z +// End: 2020-12-31T23:59:59.999Z +// Description: This script calculates the interchange fees between DFSPs where the account type is "Wallet" +// ******************************************************** + +// ## Globals: +// payload: The contents of the message from the Kafka topic. +// transfer: The transfer object. + +// # Functions: +// ## Data retrieval functions: +// getTransfer(transferId): Retrieves a mojaloop transfer from the central-ledger API. + +// ## Helper functions: +// getExtensionValue(list, key): Gets a value from an extension list +// log(message): allows the script to log to standard out for debugging purposes + +// Math functions: +// multiply(number1, number2, decimalPlaces): Uses ml-number to handle multiplication of money values + +// Ledger functions: +// addLedgerEntry: Adds a debit and credit ledger entry to the specified account to the specified DFSPs + +// let transfer +// eslint-disable-next-line prefer-const,no-undef +// transfer = getTransfer(payload.id) +// eslint-disable-next-line no-undef +log(JSON.stringify(transfer)) +// eslint-disable-next-line no-undef +const payerFspId = transfer.payer.partyIdInfo.fspId +// eslint-disable-next-line no-undef +const payeeFspId = transfer.payee.partyIdInfo.fspId + +if ((payeeFspId !== payerFspId) && + // eslint-disable-next-line no-undef + (getExtensionValue(transfer.payee.partyIdInfo.extensionList.extension, 'accountType') === 'Wallet' && + // eslint-disable-next-line no-undef + getExtensionValue(transfer.payer.partyIdInfo.extensionList.extension, 'accountType') === 'Wallet') && + // eslint-disable-next-line no-undef + (transfer.transactionType.scenario === 'TRANSFER' && + // eslint-disable-next-line no-undef + transfer.transactionType.initiator === 'PAYER' && + // eslint-disable-next-line no-undef + transfer.transactionType.initiatorType === 'CONSUMER')) { + // eslint-disable-next-line no-undef + log(`Adding an interchange fee for Wallet to Wallet from ${payerFspId} to ${payeeFspId}`) + // eslint-disable-next-line no-undef + addLedgerEntry(payload.id, 'INTERCHANGE_FEE', // Ledger account type Id + 'INTERCHANGE_FEE', // Ledger entry type Id + // eslint-disable-next-line no-undef + multiply(transfer.amount.amount, 0.006, 2), + // eslint-disable-next-line no-undef + transfer.amount.currency, + payerFspId, + payeeFspId) +} diff --git a/test/unit/domain/transactions/index.test.js b/test/unit/domain/transactions/index.test.js new file mode 100644 index 00000000..45006279 --- /dev/null +++ b/test/unit/domain/transactions/index.test.js @@ -0,0 +1,128 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Lazola Lucas + -------------- + ******/ +'use strict' + +const Test = require('tapes')(require('tape')) +const Sinon = require('sinon') +const Db = require('../../../../src/lib/db') +const IlpPackets = require('../../../../src/models/ilpPackets/ilpPacket') + +const TransactionsService = require('../../../../src/domain/transactions/index') + +Test('Transactions Service', async (transactionsTest) => { + let sandbox + + transactionsTest.beforeEach(t => { + sandbox = Sinon.createSandbox() + + Db.ilpPacket = { + find: sandbox.stub() + } + t.end() + }) + + transactionsTest.afterEach(t => { + sandbox.restore() + t.end() + }) + + const ilpPacket = { + transferId: '6d3e964e-9a25-4ff5-a365-2cc5af348321', + value: 'AYIC-AAAAAAAAeIfHWcucGF5ZWVmc3AubXNpc2RuLjIyNTU2OTk5MTI1ggLOZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pTlRWa09ESXdObVV0T0RCaU55MDBPR00wTFRrNU5HTXRaREEyTmpRd01XRXdZbU00SWl3aWNYVnZkR1ZKWkNJNklqRmtPVGhpTkdReExXWmpOVFV0TkRaa09DMDROV1EyTFRnNVl6TXdZMkZoWWpRME5pSXNJbkJoZVdWbElqcDdJbkJoY25SNVNXUkpibVp2SWpwN0luQmhjblI1U1dSVWVYQmxJam9pVFZOSlUwUk9JaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pTWpJMU5UWTVPVGt4TWpVaUxDSm1jM0JKWkNJNkluQmhlV1ZsWm5Od0luMTlMQ0p3WVhsbGNpSTZleUp3WVhKMGVVbGtTVzVtYnlJNmV5SndZWEowZVVsa1ZIbHdaU0k2SWsxVFNWTkVUaUlzSW5CaGNuUjVTV1JsYm5ScFptbGxjaUk2SWpJeU5UQTNNREE0TVRneElpd2labk53U1dRaU9pSndZWGxsY21aemNDSjlMQ0p3WlhKemIyNWhiRWx1Wm04aU9uc2lZMjl0Y0d4bGVFNWhiV1VpT25zaVptbHljM1JPWVcxbElqb2lUV0YwY3lJc0lteGhjM1JPWVcxbElqb2lTR0ZuYldGdUluMHNJbVJoZEdWUFprSnBjblJvSWpvaU1UazRNeTB4TUMweU5TSjlmU3dpWVcxdmRXNTBJanA3SW1OMWNuSmxibU41SWpvaVZWTkVJaXdpWVcxdmRXNTBJam94TWpNMExqSXpmU3dpZEhKaGJuTmhZM1JwYjI1VWVYQmxJanA3SW5OalpXNWhjbWx2SWpvaVZGSkJUbE5HUlZJaUxDSnBibWwwYVdGMGIzSWlPaUpRUVZsRlVpSXNJbWx1YVhScFlYUnZjbFI1Y0dVaU9pSkRUMDVUVlUxRlVpSjlmUQA', + createdDate: '2020-05-23T17:31:29.000Z' + } + const base64Value = 'AYIC-AAAAAAAAeIfHWcucGF5ZWVmc3AubXNpc2RuLjIyNTU2OTk5MTI1ggLOZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pTlRWa09ESXdObVV0T0RCaU55MDBPR00wTFRrNU5HTXRaREEyTmpRd01XRXdZbU00SWl3aWNYVnZkR1ZKWkNJNklqRmtPVGhpTkdReExXWmpOVFV0TkRaa09DMDROV1EyTFRnNVl6TXdZMkZoWWpRME5pSXNJbkJoZVdWbElqcDdJbkJoY25SNVNXUkpibVp2SWpwN0luQmhjblI1U1dSVWVYQmxJam9pVFZOSlUwUk9JaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pTWpJMU5UWTVPVGt4TWpVaUxDSm1jM0JKWkNJNkluQmhlV1ZsWm5Od0luMTlMQ0p3WVhsbGNpSTZleUp3WVhKMGVVbGtTVzVtYnlJNmV5SndZWEowZVVsa1ZIbHdaU0k2SWsxVFNWTkVUaUlzSW5CaGNuUjVTV1JsYm5ScFptbGxjaUk2SWpJeU5UQTNNREE0TVRneElpd2labk53U1dRaU9pSndZWGxsY21aemNDSjlMQ0p3WlhKemIyNWhiRWx1Wm04aU9uc2lZMjl0Y0d4bGVFNWhiV1VpT25zaVptbHljM1JPWVcxbElqb2lUV0YwY3lJc0lteGhjM1JPWVcxbElqb2lTR0ZuYldGdUluMHNJbVJoZEdWUFprSnBjblJvSWpvaU1UazRNeTB4TUMweU5TSjlmU3dpWVcxdmRXNTBJanA3SW1OMWNuSmxibU41SWpvaVZWTkVJaXdpWVcxdmRXNTBJam94TWpNMExqSXpmU3dpZEhKaGJuTmhZM1JwYjI1VWVYQmxJanA3SW5OalpXNWhjbWx2SWpvaVZGSkJUbE5HUlZJaUxDSnBibWwwYVdGMGIzSWlPaUpRUVZsRlVpSXNJbWx1YVhScFlYUnZjbFI1Y0dVaU9pSkRUMDVUVlUxRlVpSjlmUQA==' + const transactionObject = { + transactionId: '55d8206e-80b7-48c4-994c-d066401a0bc8', + quoteId: '1d98b4d1-fc55-46d8-85d6-89c30caab446', + payee: { + partyIdInfo: { + partyIdType: 'MSISDN', + partyIdentifier: '22556999125', + fspId: 'payeefsp' + } + }, + payer: { + partyIdInfo: { + partyIdType: 'MSISDN', + partyIdentifier: '22507008181', + fspId: 'payerfsp' + }, + personalInfo: { + complexName: { + firstName: 'Mats', + lastName: 'Hagman' + }, + dateOfBirth: '1983-10-25' + } + }, + amount: { + currency: 'USD', + amount: 1234.23 + }, + transactionType: { + scenario: 'TRANSFER', + initiator: 'PAYER', + initiatorType: 'CONSUMER' + } + } + + await transactionsTest.test('get ilpPacket object by transfer id', async (assert) => { + try { + sandbox.stub(IlpPackets, 'getById').returns(ilpPacket) + const expected = await TransactionsService.getById('6d3e964e-9a25-4ff5-a365-2cc5af348321') + assert.equal(expected, ilpPacket) + assert.end() + } catch (err) { + assert.assert(err instanceof Error, ` throws ${err} `) + assert.end() + } + }) + + await transactionsTest.test('get ilpPacket by transfer id should throw an error', async (assert) => { + try { + sandbox.stub(IlpPackets, 'getById').throws(new Error()) + await TransactionsService.getById('6d3e964e-9a25-4ff5-a365-2cc5af348321') + assert.fail('Error not thrown') + assert.end() + } catch (err) { + assert.ok(err instanceof Error) + assert.end() + } + }) + + await transactionsTest.test('get transaction object by transfer id', async (assert) => { + try { + const expected = await TransactionsService.getTransactionObject(base64Value) + assert.deepEqual(expected, transactionObject) + assert.end() + } catch (err) { + assert.assert(err instanceof Error, ` throws ${err} `) + assert.end() + } + }) + + await transactionsTest.end() +}) diff --git a/test/unit/domain/transferSettlement/index.test.js b/test/unit/domain/transferSettlement/index.test.js new file mode 100644 index 00000000..2506b93a --- /dev/null +++ b/test/unit/domain/transferSettlement/index.test.js @@ -0,0 +1,109 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * Deon Botha + -------------- + ******/ + +'use strict' + +const Test = require('tapes')(require('tape')) +const Sinon = require('sinon') +const Logger = require('@mojaloop/central-services-logger') +const TransferFulfilService = require('../../../../src/domain/transferSettlement') +const TransferFulfilModel = require('../../../../src/models/transferSettlement') + +Test('TransferSettlementService', async (transferSettlementServiceTest) => { + let sandbox + + transferSettlementServiceTest.beforeEach(test => { + sandbox = Sinon.createSandbox() + test.end() + }) + + transferSettlementServiceTest.afterEach(test => { + sandbox.restore() + test.end() + }) + + const transferEventId = '154cbf04-bac7-444d-aa66-76f66126d7f5' + + await transferSettlementServiceTest.test('processMsgFulfil should', async processFulfilTest => { + const transferEventStateStatus = 'error' + + await processFulfilTest.test('process a fulfil message', async test => { + try { + TransferFulfilModel.updateStateChange = sandbox.stub().returns() + await TransferFulfilService.processMsgFulfil(transferEventId, transferEventStateStatus) + test.ok(TransferFulfilModel.updateStateChange.withArgs(transferEventId, transferEventStateStatus).calledOnce, 'TransferFulfilModel.updateStateChange with args ... called once') + test.end() + } catch (err) { + Logger.error(`processFulfilTest failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await processFulfilTest.test('throw an exception', async test => { + try { + TransferFulfilModel.updateStateChange = sandbox.stub().throws(new Error('Error occurred')) + await TransferFulfilService.processMsgFulfil(transferEventId, transferEventStateStatus) + test.fail() + test.end() + } catch (err) { + Logger.error(`processFulfilTest failed with error - ${err}`) + test.pass() + test.end() + } + }) + await processFulfilTest.end() + }) + + await transferSettlementServiceTest.test('insertLedgerEntries should', async ledgerEntriesTest => { + const ledgerEntries = [] + + await ledgerEntriesTest.test('insert ledger entries', async test => { + try { + TransferFulfilModel.insertLedgerEntries = sandbox.stub().returns() + await TransferFulfilService.insertLedgerEntries(ledgerEntries, transferEventId) + test.ok(TransferFulfilModel.insertLedgerEntries.withArgs(ledgerEntries, transferEventId).calledOnce, 'TransferFulfilModel.insertLedgerEntries with args ... called once') + test.end() + } catch (err) { + test.fail() + test.end() + } + }) + + await ledgerEntriesTest.test('throw an exception', async test => { + try { + TransferFulfilModel.insertLedgerEntries = sandbox.stub().throws(new Error('Error occurred')) + await TransferFulfilService.insertLedgerEntries(ledgerEntries, transferEventId) + test.fail() + test.end() + } catch (err) { + Logger.error(`insertLedgerEntries failed with error - ${err}`) + test.pass() + test.end() + } + }) + await ledgerEntriesTest.end() + }) + await transferSettlementServiceTest.end() +}) diff --git a/test/unit/handlers/index.test.js b/test/unit/handlers/index.test.js index 1cc6d768..e3c33fab 100644 --- a/test/unit/handlers/index.test.js +++ b/test/unit/handlers/index.test.js @@ -58,15 +58,21 @@ Test('cli', async (cliTest) => { 'node', 'index.js', 'handler', - '--settlementwindow' + '--settlementwindow', + '--transfersettlement' ] process.argv = argv const settlementwindowHandler = { type: 'settlementwindow', enabled: true } + const transfersettlement = { + type: 'transfersettlement', + enabled: true + } const handlerList = [ - settlementwindowHandler + settlementwindowHandler, + transfersettlement ] const initOptions = { service: 'handler', diff --git a/test/unit/handlers/register.test.js b/test/unit/handlers/register.test.js index 0a61278c..d1f2642f 100644 --- a/test/unit/handlers/register.test.js +++ b/test/unit/handlers/register.test.js @@ -32,6 +32,7 @@ const Handlers = require('../../../src/handlers/register') const Proxyquire = require('proxyquire') const SettlementWindowHandlers = require('../../../src/handlers/settlementWindow/handler') +const TransferFulfilHandlers = require('../../../src/handlers/transferSettlement/handler') Test('handlers', handlersTest => { let sandbox @@ -39,6 +40,7 @@ Test('handlers', handlersTest => { handlersTest.beforeEach(test => { sandbox = Sinon.createSandbox() sandbox.stub(SettlementWindowHandlers, 'registerAllHandlers').returns(Promise.resolve(true)) + sandbox.stub(TransferFulfilHandlers, 'registerAllHandlers').returns(Promise.resolve(true)) test.end() }) diff --git a/test/unit/handlers/transferSettlement/handler.test.js b/test/unit/handlers/transferSettlement/handler.test.js new file mode 100644 index 00000000..533535d2 --- /dev/null +++ b/test/unit/handlers/transferSettlement/handler.test.js @@ -0,0 +1,312 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Deon Botha + -------------- + ******/ +'use strict' + +const Test = require('tapes')(require('tape')) +const Sinon = require('sinon') +const Uuid = require('uuid4') +const Proxyquire = require('proxyquire') +const Util = require('@mojaloop/central-services-shared').Util +const Kafka = require('@mojaloop/central-services-shared').Util.Kafka +const Logger = require('@mojaloop/central-services-logger') +const Consumer = require('@mojaloop/central-services-stream').Util.Consumer +const KafkaConsumer = require('@mojaloop/central-services-stream').Kafka.Consumer +const Db = require('../../../../src/lib/db') +const TransferFulfilService = require('../../../../src/domain/transferSettlement/index') +const ScriptsLoader = require('../../../../src/lib/scriptsLoader') +const TransferFulfilHandler = require('../../../../src/handlers/transferSettlement/handler') + +const payload = { + settlementWindowId: '3', + reason: 'test' +} +const transfer = { + transferId: 'b51ec534-ee48-4575-b6a9-ead2955b8999', + payerFsp: 'dfsp1', + payeeFsp: 'dfsp2', + amount: { + currency: 'USD', + amount: '433.88' + }, + ilpPacket: 'AYIBgQAAAAAAAASwNGxldmVsb25lLmRmc3AxLm1lci45T2RTOF81MDdqUUZERmZlakgyOVc4bXFmNEpLMHlGTFGCAUBQU0svMS4wCk5vbmNlOiB1SXlweUYzY3pYSXBFdzVVc05TYWh3CkVuY3J5cHRpb246IG5vbmUKUGF5bWVudC1JZDogMTMyMzZhM2ItOGZhOC00MTYzLTg0NDctNGMzZWQzZGE5OGE3CgpDb250ZW50LUxlbmd0aDogMTM1CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24vanNvbgpTZW5kZXItSWRlbnRpZmllcjogOTI4MDYzOTEKCiJ7XCJmZWVcIjowLFwidHJhbnNmZXJDb2RlXCI6XCJpbnZvaWNlXCIsXCJkZWJpdE5hbWVcIjpcImFsaWNlIGNvb3BlclwiLFwiY3JlZGl0TmFtZVwiOlwibWVyIGNoYW50XCIsXCJkZWJpdElkZW50aWZpZXJcIjpcIjkyODA2MzkxXCJ9IgA', + condition: 'YlK5TZyhflbXaDRPtR5zhCu8FrbgvrQwwmzuH0iQ0AI', + expiration: '2016-05-24T08:38:08.699-04:00', + extensionList: { + extension: [ + { + key: 'key1', + value: 'value1' + }, + { + key: 'key2', + value: 'value2' + } + ] + } +} +const messageProtocol = { + id: Uuid(), + from: transfer.payerFsp, + to: transfer.payeeFsp, + type: 'application/json', + content: { + headers: { 'fspiop-destination': transfer.payerFsp }, + uriParams: { id: transfer.transferId }, + payload + }, + metadata: { + event: { + id: Uuid(), + type: 'settlement', + action: 'commit', + createdAt: new Date(), + state: { + status: 'success', + code: 0 + } + } + }, + pp: '' +} + +const topicName = 'topic-test' + +const messages = [ + { + topic: topicName, + value: messageProtocol + } +] + +const config = { + options: { + mode: 2, + batchSize: 1, + pollFrequency: 10, + recursiveTimeout: 100, + messageCharset: 'utf8', + messageAsJSON: true, + sync: true, + consumeTimeout: 1000 + }, + rdkafkaConf: { + 'client.id': 'kafka-test', + debug: 'all', + 'group.id': 'central-ledger-kafka', + 'metadata.broker.list': 'localhost:9092', + 'enable.auto.commit': false + } +} + +const command = () => {} + +Test('TransferSettlementHandler', async (transferSettlementHandlerTest) => { + let sandbox + transferSettlementHandlerTest.beforeEach(test => { + sandbox = Sinon.createSandbox() + sandbox.stub(KafkaConsumer.prototype, 'constructor').returns(Promise.resolve()) + sandbox.stub(KafkaConsumer.prototype, 'connect').returns(Promise.resolve()) + sandbox.stub(KafkaConsumer.prototype, 'consume').returns(Promise.resolve()) + sandbox.stub(KafkaConsumer.prototype, 'commitMessageSync').returns(Promise.resolve()) + sandbox.stub(Consumer, 'getConsumer').returns({ + commitMessageSync: async function () { + return true + } + }) + sandbox.stub(Consumer, 'isConsumerAutoCommitEnabled').returns(false) + sandbox.stub(Kafka) + sandbox.stub(Logger) + sandbox.stub(Util.StreamingProtocol) + Kafka.produceGeneralMessage.returns(Promise.resolve()) + const knexStub = sandbox.stub() + sandbox.stub(Db, 'getKnex').returns(knexStub) + const trxStub = sandbox.stub() + knexStub.transaction = sandbox.stub().callsArgWith(0, trxStub) + test.end() + }) + + transferSettlementHandlerTest.afterEach(test => { + sandbox.restore() + test.end() + }) + + transferSettlementHandlerTest.test('registerAllHandlers should', registerAllHandlersTest => { + registerAllHandlersTest.test('register all consumers on Kafka', async (test) => { + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Kafka.transformGeneralTopicName.returns(topicName) + Kafka.getKafkaConfig.returns(config) + sandbox.stub(ScriptsLoader, 'loadScripts').returns({}) + const result = await TransferFulfilHandler.registerAllHandlers() + test.equal(result, true) + test.ok(ScriptsLoader.loadScripts.withArgs('./scripts/transferSettlementTemp').calledOnce, 'ScriptsLoader loadScripts called once') + test.end() + }) + + transferSettlementHandlerTest.test('throw error registerAllHandlers', async (test) => { + try { + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + Kafka.transformGeneralTopicName.returns(topicName) + Kafka.getKafkaConfig.throws(new Error()) + + await TransferFulfilHandler.registerAllHandlers() + test.fail('Error not thrown') + test.end() + } catch (e) { + test.pass('Error thrown') + test.end() + } + }) + registerAllHandlersTest.end() + }) + + transferSettlementHandlerTest.test('processTransferSettlement should', processTransferSettlementTest => { + processTransferSettlementTest.test('process when messages is in array', async (test) => { + const localMessages = Util.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + sandbox.stub(TransferFulfilService, 'insertLedgerEntries') + sandbox.stub(TransferFulfilService, 'processMsgFulfil') + sandbox.stub(ScriptsLoader, 'executeScripts').returns({}) + const result = await TransferFulfilHandler.processTransferSettlement(null, localMessages) + test.equal(result, true) + test.ok(TransferFulfilService.processMsgFulfil.calledOnce, 'processMsgFulfil called once') + test.ok(TransferFulfilService.insertLedgerEntries.notCalled, 'insertLedgerEntries called once') + test.end() + }) + + processTransferSettlementTest.test('process when there is a single message', async (test) => { + const localMessages = Util.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + sandbox.stub(TransferFulfilService, 'insertLedgerEntries') + sandbox.stub(TransferFulfilService, 'processMsgFulfil') + sandbox.stub(ScriptsLoader, 'executeScripts').returns({}) + const result = await TransferFulfilHandler.processTransferSettlement(null, localMessages[0]) + test.equal(result, true) + test.ok(TransferFulfilService.processMsgFulfil.calledOnce, 'processMsgFulfil called once') + test.ok(TransferFulfilService.insertLedgerEntries.notCalled, 'insertLedgerEntries called once') + test.end() + }) + + processTransferSettlementTest.test('process when there is a single message with ledger entries', async (test) => { + const localMessages = Util.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + sandbox.stub(ScriptsLoader, 'executeScripts').returns({ + ledgerEntries: [{ + transferId: 'b51ec534-ee48-4575-b6a9-ead2955b8999', + ledgerAccountTypeId: 'INTERCHANGE_FEE', + ledgerEntryTypeId: 'INTERCHANGE_FEE', + amount: 0.02, + currency: 'USD', + payerFspId: 'dfsp1', + payeeFspId: 'dfsp2' + }] + }) + sandbox.stub(TransferFulfilService, 'insertLedgerEntries') + sandbox.stub(TransferFulfilService, 'processMsgFulfil') + const result = await TransferFulfilHandler.processTransferSettlement(null, localMessages[0]) + test.equal(result, true) + test.ok(TransferFulfilService.processMsgFulfil.calledOnce, 'processMsgFulfil called once') + test.ok(TransferFulfilService.insertLedgerEntries.calledOnce, 'insertLedgerEntries called once') + test.end() + }) + + processTransferSettlementTest.test('rollback a transaction on error', async (test) => { + const localMessages = Util.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + sandbox.stub(ScriptsLoader, 'executeScripts').returns({}) + sandbox.stub(TransferFulfilService, 'insertLedgerEntries') + sandbox.stub(TransferFulfilService, 'processMsgFulfil').throws(new Error('Error occurred')) + const retryStub = sandbox.stub().callsArg(0) + const TransferFulfilHandlerProxy = Proxyquire('../../../../src/handlers/transferSettlement/handler', { + 'async-retry': retryStub + }) + const result = await TransferFulfilHandlerProxy.processTransferSettlement(null, localMessages[0]) + test.equal(result, true) + test.ok(TransferFulfilService.insertLedgerEntries.notCalled, 'insertLedgerEntries called once') + test.end() + }) + + processTransferSettlementTest.test('create a FSPIOP error when an error condition is passed in', async (test) => { + const localMessages = Util.clone(messages) + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + try { + await TransferFulfilHandler.processTransferSettlement(true, localMessages[0]) + test.fail('should throw error') + test.end() + } catch (err) { + test.ok('FSPIOP Error is thrown.') + test.end() + } + }) + + processTransferSettlementTest.test('create a FSPIOP error when the payload is null', async (test) => { + const localMessages = Util.clone(messages) + localMessages[0].value.content.payload = null + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + try { + await TransferFulfilHandler.processTransferSettlement(null, localMessages[0]) + test.pass('Update terminated due to missing payload') + test.end() + } catch (err) { + test.ok('FSPIOP Error is thrown.') + test.end() + } + }) + + processTransferSettlementTest.test('create a FSPIOP error when the event action is unknown', async (test) => { + const localMessages = Util.clone(messages) + localMessages[0].value.metadata.event.action = 'unknown' + await Consumer.createHandler(topicName, config, command) + Kafka.transformAccountToTopicName.returns(topicName) + Kafka.proceed.returns(true) + try { + await TransferFulfilHandler.processTransferSettlement(null, localMessages[0]) + test.pass('Update terminated due to unknown event action') + test.end() + } catch (err) { + test.ok('FSPIOP Error is thrown.') + test.end() + } + }) + processTransferSettlementTest.end() + }) + + transferSettlementHandlerTest.end() +}) diff --git a/test/unit/lib/scriptEngine.test.js b/test/unit/lib/scriptEngine.test.js new file mode 100644 index 00000000..9b96dae7 --- /dev/null +++ b/test/unit/lib/scriptEngine.test.js @@ -0,0 +1,174 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + + * Gates Foundation + - Name Surname + + * Claudio Viola + + -------------- + ******/ + +'use strict' + +const Sinon = require('sinon') +const Test = require('tapes')(require('tape')) +const Transaction = require('../../../src/domain/transactions/index') +const Logger = require('@mojaloop/central-services-logger') +const scriptEngine = require('../../../src/lib/scriptEngine') +const vm = require('vm') +const fs = require('fs') +const path = require('path') + +const transferObjectMock = { + transactionId: 'cb4c0f77-286d-40a5-8dfe-b162e64482ee', + quoteId: 'ad1b4bea-32f4-4f48-a70d-7e13b28b453b', + payee: { + partyIdInfo: { + partyIdType: 'MSISDN', + partyIdentifier: '27713813914', + fspId: 'testfsp1', + extensionList: { + extension: [ + { + key: 'accountType', + value: 'Wallet' + } + ] + } + }, + personalInfo: { + complexName: { + firstName: 'testfsp1BankFname', + lastName: 'testfsp1BankLname' + }, + dateOfBirth: '1985-05-13' + } + }, + payer: { + partyIdInfo: { + partyIdType: 'MSISDN', + partyIdentifier: '27713803912', + fspId: 'payerfsp', + extensionList: { + extension: [ + { + key: 'accountType', + value: 'Wallet' + } + ] + } + }, + name: 'payerfspFname payerfspLname' + }, + amount: { + amount: '10', + currency: 'TZS' + }, + transactionType: { + scenario: 'TRANSFER', + initiator: 'PAYER', + initiatorType: 'CONSUMER' + } +} +const entityMock = [{ + transferId: '6d3e964e-9a25-4ff5-a365-2cc5af348321', + value: 'AYIEGAAAAAAAAAXcHWcudGVzdGZzcDMubXNpc2RuLjI3NzEzODAzOTE2ggPuZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pWW1FeE1qSTNaVEF0WkdVNFl5MDBZemRtTFdFd09Ea3RaV1k1T0RoaU1XVmhaRFJsSWl3aWNYVnZkR1ZKWkNJNklqSTBOemxsWlRjeExXRXpZemd0TkRRMk5DMWhPVEF3TFdNMVpEVXpZamd4Wm1JNE1pSXNJbkJoZVdWbElqcDdJbkJoY25SNVNXUkpibVp2SWpwN0luQmhjblI1U1dSVWVYQmxJam9pVFZOSlUwUk9JaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pTWpjM01UTTRNRE01TVRZaUxDSm1jM0JKWkNJNkluUmxjM1JtYzNBeklpd2laWGgwWlc1emFXOXVUR2x6ZENJNmV5SmxlSFJsYm5OcGIyNGlPbHQ3SW10bGVTSTZJbUZqWTI5MWJuUlVlWEJsSWl3aWRtRnNkV1VpT2lKWFlXeHNaWFFpZlYxOWZTd2ljR1Z5YzI5dVlXeEpibVp2SWpwN0ltTnZiWEJzWlhoT1lXMWxJanA3SW1acGNuTjBUbUZ0WlNJNkluUmxjM1JtYzNBelYyRnNiR1YwUm01aGJXVWlMQ0pzWVhOMFRtRnRaU0k2SW5SbGMzUm1jM0F6VjJGc2JHVjBURzVoYldVaWZTd2laR0YwWlU5bVFtbHlkR2dpT2lJeE9UZzFMVEExTFRFekluMTlMQ0p3WVhsbGNpSTZleUp3WVhKMGVVbGtTVzVtYnlJNmV5SndZWEowZVVsa1ZIbHdaU0k2SWsxVFNWTkVUaUlzSW5CaGNuUjVTV1JsYm5ScFptbGxjaUk2SWpJM056RXpPREF6T1RFMUlpd2labk53U1dRaU9pSjBaWE4wWm5Od01pSXNJbVY0ZEdWdWMybHZia3hwYzNRaU9uc2laWGgwWlc1emFXOXVJanBiZXlKclpYa2lPaUpoWTJOdmRXNTBWSGx3WlNJc0luWmhiSFZsSWpvaVYyRnNiR1YwSW4xZGZYMHNJbTVoYldVaU9pSjBaWE4wWm5Od01sZGhiR3hsZEVadVlXMWxJSFJsYzNSbWMzQXlWMkZzYkdWMFRHNWhiV1VpZlN3aVlXMXZkVzUwSWpwN0ltRnRiM1Z1ZENJNklqRTFJaXdpWTNWeWNtVnVZM2tpT2lKVVdsTWlmU3dpZEhKaGJuTmhZM1JwYjI1VWVYQmxJanA3SW5OalpXNWhjbWx2SWpvaVZGSkJUbE5HUlZJaUxDSnBibWwwYVdGMGIzSWlPaUpRUVZsRlVpSXNJbWx1YVhScFlYUnZjbFI1Y0dVaU9pSkRUMDVUVlUxRlVpSjlmUQA', + createdDate: '2020-05-23T17:31:29.000Z' +}] + +Test('Script Engine Execute Test', async (scriptEngineTest) => { + let sandbox + + scriptEngineTest.beforeEach(test => { + sandbox = Sinon.createSandbox() + sandbox.stub(Logger) + test.end() + }) + + scriptEngineTest.afterEach(test => { + sandbox.restore() + test.end() + }) + + await scriptEngineTest.test('should successfully execute', async (test) => { + const transferId = '07785623-1d17-4231-b7fe-48bacaa05d58' + const scriptSource = fs.readFileSync(path.resolve('./test/unit/data/interchangeCalculationTestScript.js'), 'utf8') + const script = new vm.Script(scriptSource) + const scriptSpy = sandbox.spy(script, 'runInNewContext') + const payload = { + id: transferId + } + const getByIdStub = sandbox.stub(Transaction, 'getById') + getByIdStub.resolves(entityMock) + const getTransactionObjectStub = sandbox.stub(Transaction, 'getTransactionObject') + getTransactionObjectStub.resolves(transferObjectMock) + const result = await scriptEngine.execute(script, payload) + const scriptSpyLastCall = scriptSpy.lastCall + test.deepEqual(getByIdStub.lastCall.args[0], payload.id, 'should find the transaction by transferId') + test.deepEqual(getTransactionObjectStub.lastCall.args[0], entityMock[0].value, 'should get the transactionObject by its value') + test.deepEqual(scriptSpyLastCall.args[0].payload, payload, 'should execute the script with given payload arguments') + test.deepEqual(scriptSpyLastCall.args[0].transfer, transferObjectMock, 'should execute the script with found transaction') + test.ok(typeof scriptSpyLastCall.args[0].log === 'function', 'should pass along a log function') + test.ok(typeof scriptSpyLastCall.args[0].multiply === 'function', 'should pass along a multiply function') + test.ok(typeof scriptSpyLastCall.args[0].getExtensionValue === 'function', 'should pass along a getExtensionValue function') + test.ok(typeof scriptSpyLastCall.args[0].addLedgerEntry === 'function', 'should pass along a addLedgerEntry function') + test.deepEqual(result, { + ledgerEntries: [ + { + transferId: payload.id, + ledgerAccountTypeId: 'INTERCHANGE_FEE', + ledgerEntryTypeId: 'INTERCHANGE_FEE', + amount: '0.06', + currency: transferObjectMock.amount.currency, + payerFspId: transferObjectMock.payer.partyIdInfo.fspId, + payeeFspId: transferObjectMock.payee.partyIdInfo.fspId + } + ] + }) + + test.end() + }) + + await scriptEngineTest.test('should throw if no transaction is found', async (test) => { + const transferId = '07785623-1d17-4231-b7fe-48bacaa05d58' + const script = { + runInNewContext: sandbox.stub() + } + const payload = { + id: transferId + } + const getByIdStub = sandbox.stub(Transaction, 'getById') + getByIdStub.resolves(null) + try { + await scriptEngine.execute(script, payload) + test.fail('Should have thrown an error!') + test.end() + } catch (err) { + console.log(err.message) + test.equal(err.message, `No records for transferId ${payload.id} was found`, 'should throw an error message if transaction is not found') + test.equal(script.runInNewContext.getCalls.length, 0, 'should have not executed the script') + test.end() + } + }) + + await scriptEngineTest.end() +}) diff --git a/test/unit/lib/scriptsLoader.test.js b/test/unit/lib/scriptsLoader.test.js new file mode 100644 index 00000000..920884c5 --- /dev/null +++ b/test/unit/lib/scriptsLoader.test.js @@ -0,0 +1,291 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Lazola Lucas + -------------- + ******/ +'use strict' + +const Test = require('tapes')(require('tape')) +const Sinon = require('sinon') +const ScriptsLoader = require('../../../src/lib/scriptsLoader') +const ScriptEngine = require('../../../src/lib/scriptEngine') + +const scriptDirectory = '/test/unit/data' +const scriptType = 'notification' +const scriptAction = 'commit' +const scriptStatus = 'success' + +const ledgerEntriesStub = { + ledgerEntries: [{ + transferId: '532bc6a1-c880-4c8d-bbf8-385f4dd33483', + ledgerAccountTypeId: 'INTERCHANGE_FEE', + ledgerEntryTypeId: 'INTERCHANGE_FEE', + amount: '0.09', + currency: 'TZS', + payerFspId: 'testfsp2', + payeeFspId: 'testfsp3' + }] +} + +const message = { + id: 'c9af8344-278b-4dcb-8b99-80bca31ebaf4', + from: 'dfsp1', + to: 'dfsp2', + type: 'application/json', + content: { + uriParams: { + id: 'b51ec534-ee48-4575-b6a9-ead2955b8999' + }, + payload: { + settlementWindowId: '3', + reason: 'test' + } + }, + metadata: { + event: { + id: '852926be-7019-4537-a3a3-07b6e6e0cd14', + type: 'settlement', + action: 'commit', + createdAt: '2020-07-20T15:07:31.273Z', + state: { + status: 'success', + code: 0 + } + } + }, + pp: '' +} + +const expectedScriptsMap = { + notification: { + commit: { + success: [ + { + filename: 'dummyFeeCalculationTestScript.js', + startTime: '2020-06-01T00:00:00.000Z', + endTime: '2100-12-31T23:59:59.999Z', + script: {} + }, + { + filename: 'interchangeCalculationTestScript.js', + startTime: '2020-06-01T00:00:00.000Z', + endTime: '2020-12-31T23:59:59.999Z', + script: {} + } + ] + } + } +} + +const expectedScriptResults = { + ledgerEntries: [ + { + transferId: '532bc6a1-c880-4c8d-bbf8-385f4dd33483', + ledgerAccountTypeId: 'INTERCHANGE_FEE', + ledgerEntryTypeId: 'INTERCHANGE_FEE', + amount: '0.09', + currency: 'TZS', + payerFspId: 'testfsp2', + payeeFspId: 'testfsp3' + }, + { + transferId: '532bc6a1-c880-4c8d-bbf8-385f4dd33483', + ledgerAccountTypeId: 'INTERCHANGE_FEE', + ledgerEntryTypeId: 'INTERCHANGE_FEE', + amount: '0.09', + currency: 'TZS', + payerFspId: 'testfsp2', + payeeFspId: 'testfsp3' + } + ] +} +Test('ScriptsLoader', async (scriptsLoaderTest) => { + let sandbox + + scriptsLoaderTest.beforeEach(test => { + sandbox = Sinon.createSandbox() + test.end() + }) + + scriptsLoaderTest.afterEach(test => { + sandbox.restore() + test.end() + }) + + scriptsLoaderTest.test('loadScripts should', loadScriptsTest => { + loadScriptsTest.test('load scripts that are in the scriptDirectory and return the contents ', async (test) => { + const result = await ScriptsLoader.loadScripts(scriptDirectory) + test.equal(JSON.stringify(result), JSON.stringify(expectedScriptsMap)) + test.end() + }) + loadScriptsTest.test('load scripts fail gracefully if no directory exists and return empty contents ', async (test) => { + const result = await ScriptsLoader.loadScripts('test/unit/missing_folder') + test.deepEqual(result, {}) + test.end() + }) + loadScriptsTest.end() + }) + scriptsLoaderTest.test('executeScripts should', executeScriptsTest => { + executeScriptsTest.test('execute two scripts', async (test) => { + const scripts = { + notification: { + commit: { + success: [ + { + filename: 'dummyFeeCalculation.js', + startTime: new Date('2020-06-01T00:00:00.000Z'), + endTime: new Date('2100-12-31T23:59:59.999Z'), + script: {} + }, + { + filename: 'interchangeFeeCalculation1.js', + startTime: new Date('2020-06-01T00:00:00.000Z'), + endTime: new Date('2100-12-31T23:59:59.999Z'), + script: {} + } + ] + } + } + } + const executeStub = sandbox.stub(ScriptEngine, 'execute') + executeStub.resolves(ledgerEntriesStub) + const result = await ScriptsLoader.executeScripts(scripts, scriptType, scriptAction, scriptStatus, message) + test.deepEqual(result, expectedScriptResults) + test.end() + }) + executeScriptsTest.test('return an empty object when the ScriptEngine returns no ledger entries ', async (test) => { + const scripts = { + notification: { + commit: { + success: [ + { + filename: 'interchangeFeeCalculation1.js', + startTime: new Date('2020-06-01T00:00:00.000Z'), + endTime: new Date('2100-12-31T23:59:59.999Z'), + script: {} + } + ] + } + } + } + const executeStub = sandbox.stub(ScriptEngine, 'execute') + executeStub.resolves({}) + const result = await ScriptsLoader.executeScripts(scripts, scriptType, scriptAction, scriptStatus, message) + test.deepEqual(result, {}) + test.end() + }) + executeScriptsTest.test('throw an error when a script execution fails', async (test) => { + const scripts = { + notification: { + commit: { + success: [ + { + filename: 'dummyFeeCalculation.js', + startTime: new Date('2020-06-01T00:00:00.000Z'), + endTime: new Date('2100-12-31T23:59:59.999Z'), + script: {} + }, + { + filename: 'interchangeFeeCalculation.js', + startTime: new Date('2020-06-01T00:00:00.000Z'), + endTime: new Date('2100-12-31T23:59:59.999Z'), + script: {} + } + ] + } + } + } + const executeStub = sandbox.stub(ScriptEngine, 'execute') + executeStub.throws() + try { + await ScriptsLoader.executeScripts(scripts, scriptType, scriptAction, scriptStatus, message) + test.fail('Should have thrown an error!') + test.end() + } catch (err) { + test.equal(err.message, 'Script execution was unsuccessful', 'should throw an error message when a script fails') + test.end() + } + }) + + executeScriptsTest.test('NOT execute as the Script startTime is in the future', async (test) => { + const scripts = { + notification: { + commit: { + success: [ + { + filename: 'interchangeFeeCalculation.js', + startTime: new Date('2100-06-01T00:00:00.000Z'), + endTime: new Date('2100-12-31T23:59:59.999Z'), + script: {} + } + ] + } + } + } + const result = await ScriptsLoader.executeScripts(scripts, scriptType, scriptAction, scriptStatus, message) + test.deepEqual(result, {}) + test.end() + }) + + executeScriptsTest.test('NOT execute as the Script endTime is in the past', async (test) => { + const scripts = { + notification: { + commit: { + success: [ + { + filename: 'interchangeFeeCalculation.js', + startTime: new Date('2000-06-01T00:00:00.000Z'), + endTime: new Date('2000-12-31T23:59:59.999Z'), + script: {} + } + ] + } + } + } + const result = await ScriptsLoader.executeScripts(scripts, scriptType, scriptAction, scriptStatus, message) + test.deepEqual(result, {}) + test.end() + }) + + executeScriptsTest.test('NOT execute as the Script scriptStatus is not met, ', async (test) => { + const scripts = { + notification: { + commit: { + abort: [ + { + filename: 'interchangeFeeCalculation.js', + startTime: new Date('2020-06-01T00:00:00.000Z'), + endTime: new Date('2100-12-31T23:59:59.999Z'), + script: {} + } + ] + } + } + } + const result = await ScriptsLoader.executeScripts(scripts, scriptType, scriptAction, scriptStatus, message) + test.deepEqual(result, {}) + test.end() + }) + executeScriptsTest.end() + }) + scriptsLoaderTest.end() +}) diff --git a/test/unit/models/ilpPackets/ilpPacket.test.js b/test/unit/models/ilpPackets/ilpPacket.test.js new file mode 100644 index 00000000..87cf1edd --- /dev/null +++ b/test/unit/models/ilpPackets/ilpPacket.test.js @@ -0,0 +1,73 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + + * ModusBox + - Lazola Lucas + -------------- + ******/ +'use strict' + +const Test = require('tapes')(require('tape')) +const Sinon = require('sinon') +const Db = require('../../../../src/lib/db') +const Logger = require('@mojaloop/central-services-logger') +const IlpPacketsModel = require('../../../../src/models/ilpPackets/ilpPacket') + +Test('IlpPackets', async (IlpPacketsTest) => { + const sandbox = Sinon.createSandbox() + Db.ilpPacket = { + find: sandbox.stub() + } + + await IlpPacketsTest.test('get IlpPackets with transferId', async (assert) => { + try { + Db.ilpPacket.find.withArgs({ transferId: '6d3e964e-9a25-4ff5-a365-2cc5af348321' }).returns([ + { + transferId: '6d3e964e-9a25-4ff5-a365-2cc5af348321', + value: 'AYIC-AAAAAAAAeIfHWcucGF5ZWVmc3AubXNpc2RuLjIyNTU2OTk5MTI1ggLOZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pTlRWa09ESXdObVV0T0RCaU55MDBPR00wTFRrNU5HTXRaREEyTmpRd01XRXdZbU00SWl3aWNYVnZkR1ZKWkNJNklqRmtPVGhpTkdReExXWmpOVFV0TkRaa09DMDROV1EyTFRnNVl6TXdZMkZoWWpRME5pSXNJbkJoZVdWbElqcDdJbkJoY25SNVNXUkpibVp2SWpwN0luQmhjblI1U1dSVWVYQmxJam9pVFZOSlUwUk9JaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pTWpJMU5UWTVPVGt4TWpVaUxDSm1jM0JKWkNJNkluQmhlV1ZsWm5Od0luMTlMQ0p3WVhsbGNpSTZleUp3WVhKMGVVbGtTVzVtYnlJNmV5SndZWEowZVVsa1ZIbHdaU0k2SWsxVFNWTkVUaUlzSW5CaGNuUjVTV1JsYm5ScFptbGxjaUk2SWpJeU5UQTNNREE0TVRneElpd2labk53U1dRaU9pSndZWGxsY21aemNDSjlMQ0p3WlhKemIyNWhiRWx1Wm04aU9uc2lZMjl0Y0d4bGVFNWhiV1VpT25zaVptbHljM1JPWVcxbElqb2lUV0YwY3lJc0lteGhjM1JPWVcxbElqb2lTR0ZuYldGdUluMHNJbVJoZEdWUFprSnBjblJvSWpvaU1UazRNeTB4TUMweU5TSjlmU3dpWVcxdmRXNTBJanA3SW1OMWNuSmxibU41SWpvaVZWTkVJaXdpWVcxdmRXNTBJam94TWpNMExqSXpmU3dpZEhKaGJuTmhZM1JwYjI1VWVYQmxJanA3SW5OalpXNWhjbWx2SWpvaVZGSkJUbE5HUlZJaUxDSnBibWwwYVdGMGIzSWlPaUpRUVZsRlVpSXNJbWx1YVhScFlYUnZjbFI1Y0dVaU9pSkRUMDVUVlUxRlVpSjlmUQA', + createdDate: '2020-05-23T17:31:29.000Z' + }]) + const expected = [{ + transferId: '6d3e964e-9a25-4ff5-a365-2cc5af348321', + value: 'AYIC-AAAAAAAAeIfHWcucGF5ZWVmc3AubXNpc2RuLjIyNTU2OTk5MTI1ggLOZXlKMGNtRnVjMkZqZEdsdmJrbGtJam9pTlRWa09ESXdObVV0T0RCaU55MDBPR00wTFRrNU5HTXRaREEyTmpRd01XRXdZbU00SWl3aWNYVnZkR1ZKWkNJNklqRmtPVGhpTkdReExXWmpOVFV0TkRaa09DMDROV1EyTFRnNVl6TXdZMkZoWWpRME5pSXNJbkJoZVdWbElqcDdJbkJoY25SNVNXUkpibVp2SWpwN0luQmhjblI1U1dSVWVYQmxJam9pVFZOSlUwUk9JaXdpY0dGeWRIbEpaR1Z1ZEdsbWFXVnlJam9pTWpJMU5UWTVPVGt4TWpVaUxDSm1jM0JKWkNJNkluQmhlV1ZsWm5Od0luMTlMQ0p3WVhsbGNpSTZleUp3WVhKMGVVbGtTVzVtYnlJNmV5SndZWEowZVVsa1ZIbHdaU0k2SWsxVFNWTkVUaUlzSW5CaGNuUjVTV1JsYm5ScFptbGxjaUk2SWpJeU5UQTNNREE0TVRneElpd2labk53U1dRaU9pSndZWGxsY21aemNDSjlMQ0p3WlhKemIyNWhiRWx1Wm04aU9uc2lZMjl0Y0d4bGVFNWhiV1VpT25zaVptbHljM1JPWVcxbElqb2lUV0YwY3lJc0lteGhjM1JPWVcxbElqb2lTR0ZuYldGdUluMHNJbVJoZEdWUFprSnBjblJvSWpvaU1UazRNeTB4TUMweU5TSjlmU3dpWVcxdmRXNTBJanA3SW1OMWNuSmxibU41SWpvaVZWTkVJaXdpWVcxdmRXNTBJam94TWpNMExqSXpmU3dpZEhKaGJuTmhZM1JwYjI1VWVYQmxJanA3SW5OalpXNWhjbWx2SWpvaVZGSkJUbE5HUlZJaUxDSnBibWwwYVdGMGIzSWlPaUpRUVZsRlVpSXNJbWx1YVhScFlYUnZjbFI1Y0dVaU9pSkRUMDVUVlUxRlVpSjlmUQA', + createdDate: '2020-05-23T17:31:29.000Z' + }] + const result = await IlpPacketsModel.getById('6d3e964e-9a25-4ff5-a365-2cc5af348321') + assert.deepEqual(JSON.stringify(result), JSON.stringify(expected)) + assert.end() + } catch (err) { + Logger.error(`get IlpPackets with transferId failed with error - ${err}`) + assert.fail() + assert.end() + } + }) + + await IlpPacketsTest.test('get IlpPackets with empty transferId', async (assert) => { + Db.ilpPacket.find.withArgs().throws(new Error()) + try { + await IlpPacketsModel.getById('') + assert.fail(' should throws an error ') + } catch (err) { + assert.assert(err instanceof Error, ` throws ${err} `) + } + assert.end() + }) + await IlpPacketsTest.end() +}) diff --git a/test/unit/models/settlement/facade.test.js b/test/unit/models/settlement/facade.test.js index 6749823c..4e6dd8d8 100644 --- a/test/unit/models/settlement/facade.test.js +++ b/test/unit/models/settlement/facade.test.js @@ -1291,7 +1291,7 @@ Test('Settlement facade', async (settlementFacadeTest) => { sandbox.stub(Db, 'getKnex').returns(knexStub) sandbox.stub(Utility, 'produceGeneralMessage').returns() - await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, enums, trxStub) + await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, 1, enums, trxStub) test.fail('Error not thrown!') test.end() } catch (err) { @@ -1404,7 +1404,7 @@ Test('Settlement facade', async (settlementFacadeTest) => { sandbox.stub(Utility, 'produceGeneralMessage').returns() - const result = await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, enums, trxStub) + const result = await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, 1, enums, trxStub) test.equal(result, 0, 'Result for successful operation returned') test.equal(knexStub.withArgs('settlementParticipantCurrency AS spc').callCount, 1) test.equal(knexStub.withArgs('transferStateChange').callCount, 3) @@ -1422,6 +1422,126 @@ Test('Settlement facade', async (settlementFacadeTest) => { } }) + await settlementTransfersReserveTest.test('make transfer commit when called from within a transaction without liquidity check', async test => { + try { + const settlementId = 1 + const transactionTimestamp = new Date().toISOString().replace(/[TZ]/g, ' ').trim() + const trxStub = sandbox.stub() + + const knexStub = sandbox.stub() + knexStub.raw = sandbox.stub() + sandbox.stub(Db, 'getKnex').returns(knexStub) + const context = sandbox.stub() + context.on = sandbox.stub().returns({ + andOn: sandbox.stub() + }) + const join1Stub = sandbox.stub().callsArgOn(1, context) + const join2Stub = sandbox.stub().callsArgOn(1, context) + const leftJoin1Stub = sandbox.stub().callsArgOn(1, context) + const join3Stub = sandbox.stub().callsArgOn(1, context) + const join4Stub = sandbox.stub().callsArgOn(1, context) + knexStub.returns({ + join: join1Stub.returns({ + join: join2Stub.returns({ + leftJoin: leftJoin1Stub.returns({ + join: join3Stub.returns({ + join: sandbox.stub().returns({ + join: sandbox.stub().returns({ + join: join4Stub.returns({ + select: sandbox.stub().returns({ + where: sandbox.stub().returns({ + whereNull: sandbox.stub().returns({ + transacting: sandbox.stub().returns( + Promise.resolve( + stubData.settlementTransfersReserve.settlementTransferList + ) + ) + }) + }) + }) + }) + }) + }) + }) + }) + }) + }), + insert: sandbox.stub().returns({ + transacting: sandbox.stub() + }) + }) + knexStub.withArgs('participantPosition').returns({ + select: sandbox.stub().returns({ + where: sandbox.stub().returns({ + first: sandbox.stub().returns({ + transacting: sandbox.stub().returns({ + forUpdate: sandbox.stub().returns( + Promise.resolve({ + dfspPositionId: 1, + dfspPositionValue: 0, + dfspReservedValue: 0 + }) + ) + }) + }) + }) + }), + update: sandbox.stub().returns({ + where: sandbox.stub().returns({ + transacting: sandbox.stub() + }) + }) + }) + knexStub.withArgs('participantPositionChange').returns({ + select: sandbox.stub().returns({ + where: sandbox.stub().returns({ + orderBy: sandbox.stub().returns({ + first: sandbox.stub().returns({ + transacting: sandbox.stub() + }) + }) + }) + }), + insert: sandbox.stub().returns({ + transacting: sandbox.stub() + }) + }) + knexStub.withArgs('participantLimit').returns({ + select: sandbox.stub().returns({ + where: sandbox.stub().returns({ + andWhere: sandbox.stub().returns({ + first: sandbox.stub().returns({ + transacting: sandbox.stub().returns({ + forUpdate: sandbox.stub().returns( + Promise.resolve({ netDebitCap: 1000 }) + ) + }) + }) + }) + }) + }) + }) + + sandbox.stub(Utility, 'produceGeneralMessage').returns() + + const result = await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, 0, enums, trxStub) + test.equal(result, 0, 'Result for successful operation returned') + test.equal(knexStub.withArgs('settlementParticipantCurrency AS spc').callCount, 1) + test.equal(knexStub.withArgs('transferStateChange').callCount, 3) + test.equal(knexStub.withArgs('participantPosition').callCount, 8) + test.equal(knexStub.withArgs('participantLimit').callCount, 0) + test.equal(knexStub.withArgs('participantPosition').callCount, 8) + test.equal(knexStub.withArgs('transferFulfilment').callCount, 0) + test.equal(knexStub.withArgs('participantPositionChange').callCount, 4) + + test.end() + } catch (err) { + Logger.error(`settlementTransfersReserve failed with error - ${err}`) + test.fail() + test.end() + } + }) + await settlementTransfersReserveTest.test('throw error if insert fails', async test => { try { const settlementId = 1 @@ -1524,7 +1644,7 @@ Test('Settlement facade', async (settlementFacadeTest) => { sandbox.stub(Utility, 'produceGeneralMessage').returns() - await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, enums, trxStub) + await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, 1, enums, trxStub) test.fail('Error not thrown!') test.end() } catch (err) { @@ -1639,7 +1759,7 @@ Test('Settlement facade', async (settlementFacadeTest) => { sandbox.stub(Utility, 'produceGeneralMessage').returns() - const result = await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, enums) + const result = await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, 1, enums) test.equal(result, 0, 'Result for successful operation returned') test.end() } catch (err) { @@ -1738,7 +1858,7 @@ Test('Settlement facade', async (settlementFacadeTest) => { }) }) - await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, enums) + await SettlementFacade.settlementTransfersReserve(settlementId, transactionTimestamp, 1, enums) test.fail('Error not thrown!') test.end() } catch (err) { diff --git a/test/unit/models/settlementWindow/facade.test.js b/test/unit/models/settlementWindow/facade.test.js index 5a973f48..0611dbfb 100644 --- a/test/unit/models/settlementWindow/facade.test.js +++ b/test/unit/models/settlementWindow/facade.test.js @@ -735,11 +735,20 @@ Test('Settlement Window facade', async (settlementWindowFacadeTest) => { where: sandbox.stub().returns({ distinct: sandbox.stub() }), - join: sandbox.stub().callsArgOn(1, context2).returns({ + join: sandbox.stub().returns({ where: sandbox.stub().returns({ - groupBy: sandbox.stub().returns({ - select: sandbox.stub().returns({ - sum: sandbox.stub() + andWhere: sandbox.stub().returns({ + distinct: sandbox.stub() + }) + }), + join: sandbox.stub().callsArgOn(1, context2).returns({ + where: sandbox.stub().returns({ + andWhere: sandbox.stub().returns({ + groupBy: sandbox.stub().returns({ + select: sandbox.stub().returns({ + sum: sandbox.stub() + }) + }) }) }) }) diff --git a/test/unit/models/transferSettlement/facade.test.js b/test/unit/models/transferSettlement/facade.test.js new file mode 100644 index 00000000..efc33e22 --- /dev/null +++ b/test/unit/models/transferSettlement/facade.test.js @@ -0,0 +1,520 @@ +/***** + License + -------------- + Copyright © 2017 Bill & Melinda Gates Foundation + The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. + Contributors + -------------- + This is the official list of the Mojaloop project contributors for this file. + Names of the original copyright holders (individuals or organizations) + should be listed with a '*' in the first column. People who have + contributed from an organization can be listed under the organization + that actually holds the copyright for their contributions (see the + Gates Foundation organization for an example). Those individuals should have + their names indented and be marked with a '-'. Email address can be added + optionally within square brackets . + * Gates Foundation + - Name Surname + -------------- + ******/ + +'use strict' + +const Test = require('tapes')(require('tape')) +const Sinon = require('sinon') +const Logger = require('@mojaloop/central-services-logger') +const Model = require('../../../../src/models/transferSettlement/facade') +const Db = require('../../../../src/lib/db') + +const recordsToInsert = [{ + transferId: '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93', + participantCurrencyId: 13, + transferParticipantRoleTypeId: 1, + ledgerEntryTypeId: 2, + amount: '1.27' +}, +{ + transferId: '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93', + participantCurrencyId: 14, + transferParticipantRoleTypeId: 2, + ledgerEntryTypeId: 2, + amount: '-1.27' +}] +const ledgerEntry = { + transferId: '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93', + ledgerAccountTypeId: 'INTERCHANGE_FEE', + ledgerEntryTypeId: 'INTERCHANGE_FEE', + amount: '1.27', + currency: 'TZS', + payerFspId: 'testfsp1', + payeeFspId: 'testfsp2' +} +const expectedParticipantPositionChangeRecords = [ + { + participantPositionId: 130, + value: 39.37, + reservedValue: 0, + transferStateChangeId: 4581 + }, + { + participantPositionId: 129, + value: -39.37, + reservedValue: 0, + transferStateChangeId: 4581 + } +] +Test('TransferSettlement facade', async (transferSettlementTest) => { + let sandbox + let knexStub + let trxStub + let trxSpyCommit + let trxSpyRollBack + + transferSettlementTest.beforeEach(t => { + sandbox = Sinon.createSandbox() + trxStub = { + get commit () { + + }, + get rollback () { + + } + } + trxSpyCommit = sandbox.spy(trxStub, 'commit', ['get']) + + trxSpyRollBack = sandbox.spy(trxStub, 'rollback', ['get']) + knexStub = { + insert: sandbox.stub().returnsThis(), + increment: sandbox.stub().returnsThis(), + raw: sandbox.stub().returnsThis(), + transaction: sandbox.stub().callsArgWith(0, trxStub), + select: sandbox.stub().returnsThis(), + from: sandbox.stub().returnsThis(), + innerJoin: sandbox.stub().returnsThis(), + leftOuterJoin: sandbox.stub().returnsThis(), + where: sandbox.stub().returnsThis(), + whereIn: sandbox.stub().returnsThis(), + andWhere: sandbox.stub().returnsThis(), + orWhere: sandbox.stub().returnsThis(), + transacting: sandbox.stub(), + union: sandbox.stub().returnsThis(), + on: sandbox.stub().returnsThis(), + andOn: sandbox.stub().returnsThis(), + update: sandbox.stub().returnsThis(), + joinRaw: sandbox.stub().returnsThis() + } + t.end() + }) + + transferSettlementTest.afterEach(t => { + sandbox.restore() + t.end() + }) + + await transferSettlementTest.test('insertLedgerEntry, when everything is fine, should', async (test) => { + try { + sandbox.stub(Db, 'getKnex') + + knexStub.transacting.onCall(0).resolves(recordsToInsert) + knexStub.transacting.onCall(1).resolves(1) + knexStub.transacting.onCall(2).resolves(1) + knexStub.transacting.onCall(3).resolves(1) + + knexStub.transacting.onCall(4).resolves([{ + transferStateChangeId: 4581 + }]) + knexStub.transacting.onCall(5).resolves([ + { + participantPositionId: 130, + value: 39.37, + reservedValue: 0 + }, + { + participantPositionId: 129, + value: -39.37, + reservedValue: 0 + } + ]) + knexStub.transacting.onCall(6).resolves(1) + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + + const transferId = '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93' + await Model.insertLedgerEntry(ledgerEntry, transferId, trxStub) + test.deepEqual(knexStub.insert.getCalls()[0].args[0], recordsToInsert, 'insert the records to transferParticipant table') + test.deepEqual(knexStub.where.getCalls()[2].args[2], 13, 'increment the value of ParticipantPosition for ParticipantCurrency') + test.deepEqual(knexStub.where.getCalls()[3].args[2], 14, 'increment the value of ParticipantPosition for ParticipantCurrency') + test.deepEqual(knexStub.increment.getCalls()[0].args[0], 'value', 'increment the value of ParticipantPosition') + test.deepEqual(knexStub.increment.getCalls()[0].args[1], '1.27', 'increment the value of ParticipantPosition') + test.deepEqual(knexStub.increment.getCalls()[1].args[0], 'value', 'increment the value of ParticipantPosition') + test.deepEqual(knexStub.increment.getCalls()[1].args[1], '-1.27', 'increment the value of ParticipantPosition') + + test.deepEqual(knexStub.insert.getCalls()[1].args[0], expectedParticipantPositionChangeRecords, 'insert the records to ParticipantPositionChange table') + + test.end() + } catch (err) { + console.log(err) + test.fail(`should have not throw an error ${err}`) + test.end() + } + }) + + await transferSettlementTest.test('insertLedgerEntry when participantPosition records are not updated correctly', async (test) => { + try { + sandbox.stub(Db, 'getKnex') + knexStub.transacting.onCall(0).resolves(recordsToInsert) + knexStub.transacting.onCall(1).resolves(1) + knexStub.transacting.onCall(2).resolves(0) + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + const transferId = '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93' + await Model.insertLedgerEntry(ledgerEntry, transferId, trxStub) + test.fail('Error not thrown') + test.end() + } catch (err) { + test.ok(err instanceof Error, 'should throw an error') + test.equal(err.message, 'Unable to update participantPosition record for participantCurrencyId: 13', 'should throw Unable to update participantPosition error message') + + test.end() + } + }) + + await transferSettlementTest.test('insertLedgerEntry when transferStateChange record is not found', async (test) => { + try { + sandbox.stub(Db, 'getKnex') + knexStub.transacting.onCall(0).resolves(recordsToInsert) + knexStub.transacting.onCall(1).resolves(1) + knexStub.transacting.onCall(2).resolves(1) + knexStub.transacting.onCall(3).resolves(1) + knexStub.transacting.onCall(4).resolves([]) + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + const transferId = '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93' + await Model.insertLedgerEntry(ledgerEntry, transferId, trxStub) + test.fail('Error not thrown') + test.end() + } catch (err) { + test.ok(err instanceof Error, 'should throw an error') + test.equal(err.message, 'Unable to find transfer with COMMITTED state for transferId : 42a874d4-82a4-4471-a3fc-3dfeb6f7cb93', 'should throw Unable to find transfer error message') + + test.end() + } + }) + + await transferSettlementTest.test('insertLedgerEntry when participantPositions records are not found', async (test) => { + try { + sandbox.stub(Db, 'getKnex') + knexStub.transacting.onCall(0).resolves(recordsToInsert) + knexStub.transacting.onCall(1).resolves(1) + knexStub.transacting.onCall(2).resolves(1) + knexStub.transacting.onCall(3).resolves(1) + knexStub.transacting.onCall(4).resolves([{ + transferStateChangeId: 4581 + }]) + knexStub.transacting.onCall(5).resolves([ + { + participantPositionId: 130, + value: 39.37, + reservedValue: 0 + } + ]) + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + const transferId = '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93' + await Model.insertLedgerEntries([ledgerEntry], transferId, trxStub) + test.fail('Error not thrown') + test.end() + } catch (err) { + test.ok(err instanceof Error, 'should throw an error') + test.equal(err.message, 'Unable to find all participantPosition records for ParticipantCurrency: {13,14}', 'should throw unable to find all participantPosition records error message') + + test.end() + } + }) + + await transferSettlementTest.test('insertLedgerEntry when transaction is not passed', async (test) => { + try { + sandbox.stub(Db, 'getKnex') + + knexStub.transacting.onCall(0).resolves(recordsToInsert) + knexStub.transacting.onCall(1).resolves(1) + knexStub.transacting.onCall(2).resolves(1) + knexStub.transacting.onCall(3).resolves(1) + + knexStub.transacting.onCall(4).resolves([{ + transferStateChangeId: 4581 + }]) + knexStub.transacting.onCall(5).resolves([ + { + participantPositionId: 130, + value: 39.37, + reservedValue: 0 + }, + { + participantPositionId: 129, + value: -39.37, + reservedValue: 0 + } + ]) + knexStub.transacting.onCall(6).resolves(1) + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + + const transferId = '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93' + await Model.insertLedgerEntry(ledgerEntry, transferId) + test.equal(trxSpyCommit.get.calledOnce, true, 'should commit the transaction') + test.end() + } catch (err) { + test.fail('An error was thrown') + test.end() + } + }) + + await transferSettlementTest.test('insertLedgerEntry when transaction is not passed and an error is thrown', async (test) => { + try { + sandbox.stub(Db, 'getKnex') + + knexStub.transacting.onCall(0).resolves(recordsToInsert) + knexStub.transacting.onCall(1).rejects(new Error('An Error occured while inserting')) + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + + const transferId = '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93' + await Model.insertLedgerEntry(ledgerEntry, transferId) + test.fail('Error not thrown') + } catch (err) { + test.ok(err instanceof Error, 'should throw an error') + test.equal(err.message, 'An Error occured while inserting') + test.equal(trxSpyRollBack.get.calledOnce, true, 'should rollback the transaction') + test.end() + } + }) + + await transferSettlementTest.test('insertLedgerEntries, when everything is fine, should', async (test) => { + try { + sandbox.stub(Db, 'getKnex') + + knexStub.transacting.onCall(0).resolves(recordsToInsert) + knexStub.transacting.onCall(1).resolves(1) + knexStub.transacting.onCall(2).resolves(1) + knexStub.transacting.onCall(3).resolves(1) + + knexStub.transacting.onCall(4).resolves([{ + transferStateChangeId: 4581 + }]) + knexStub.transacting.onCall(5).resolves([ + { + participantPositionId: 130, + value: 39.37, + reservedValue: 0 + }, + { + participantPositionId: 129, + value: -39.37, + reservedValue: 0 + } + ]) + knexStub.transacting.onCall(6).resolves(1) + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + + const transferId = '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93' + await Model.insertLedgerEntries([ledgerEntry], transferId, trxStub) + test.deepEqual(knexStub.insert.getCalls()[0].args[0], recordsToInsert, 'insert the records to transferParticipant table') + test.deepEqual(knexStub.where.getCalls()[2].args[2], 13, 'increment the value of ParticipantPosition for ParticipantCurrency') + test.deepEqual(knexStub.where.getCalls()[3].args[2], 14, 'increment the value of ParticipantPosition for ParticipantCurrency') + test.deepEqual(knexStub.increment.getCalls()[0].args[0], 'value', 'increment the value of ParticipantPosition') + test.deepEqual(knexStub.increment.getCalls()[0].args[1], '1.27', 'increment the value of ParticipantPosition') + test.deepEqual(knexStub.increment.getCalls()[1].args[0], 'value', 'increment the value of ParticipantPosition') + test.deepEqual(knexStub.increment.getCalls()[1].args[1], '-1.27', 'increment the value of ParticipantPosition') + + test.deepEqual(knexStub.insert.getCalls()[1].args[0], expectedParticipantPositionChangeRecords, 'insert the records to ParticipantPositionChange table') + + test.end() + } catch (err) { + console.log(err) + test.fail(`should have not throw an error ${err}`) + test.end() + } + }) + + await transferSettlementTest.test('insertLedgerEntries, when transaction is not passed, should', async (test) => { + try { + sandbox.stub(Db, 'getKnex') + + knexStub.transacting.onCall(0).resolves(recordsToInsert) + knexStub.transacting.onCall(1).resolves(1) + knexStub.transacting.onCall(2).resolves(1) + knexStub.transacting.onCall(3).resolves(1) + + knexStub.transacting.onCall(4).resolves([{ + transferStateChangeId: 4581 + }]) + knexStub.transacting.onCall(5).resolves([ + { + participantPositionId: 130, + value: 39.37, + reservedValue: 0 + }, + { + participantPositionId: 129, + value: -39.37, + reservedValue: 0 + } + ]) + knexStub.transacting.onCall(6).resolves(1) + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + + const transferId = '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93' + await Model.insertLedgerEntries([ledgerEntry], transferId) + test.equal(trxSpyCommit.get.calledOnce, true, 'should commit the transaction') + test.end() + } catch (err) { + console.log(err) + test.fail(`should have not throw an error ${err}`) + test.end() + } + }) + + await transferSettlementTest.test('insertLedgerEntry when transaction is not passed and an error is thrown', async (test) => { + try { + sandbox.stub(Db, 'getKnex') + + knexStub.transacting.onCall(0).resolves(recordsToInsert) + knexStub.transacting.onCall(1).rejects(new Error('An Error occured while inserting')) + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + + const transferId = '42a874d4-82a4-4471-a3fc-3dfeb6f7cb93' + await Model.insertLedgerEntries([ledgerEntry], transferId) + test.fail('Error not thrown') + } catch (err) { + test.ok(err instanceof Error, 'should throw an error') + test.equal(err.message, 'An Error occured while inserting') + test.equal(trxSpyRollBack.get.calledOnce, true, 'should rollback the transaction') + test.end() + } + }) + + await transferSettlementTest.test('updateTransferSettlement should handle errors', async (test) => { + try { + const transferId = '154cbf04-bac7-444d-aa66-76f66126d7f5' + const status = 'success' + await Model.updateTransferSettlement(transferId, status) + test.fail('An error is expected') + test.end() + } catch (err) { + Logger.error(`updateTransferSettlement failed with error - ${err}`) + test.pass('Error expected') + test.end() + } + }) + + await transferSettlementTest.test('updateTransferSettlement should handle knex errors', async (test) => { + try { + const transferId = '154cbf04-bac7-444d-aa66-76f66126d7f5' + const status = 'success' + sandbox.stub(Db, 'getKnex').returns({ + transaction: async (trxFunction) => { + try { + await trxFunction(sandbox.stub()) + } catch (err) { + Logger.error(`Got error ${err}`) + throw err + } + } + }) + await Model.updateTransferSettlement(transferId, status) + test.fail('An error is expected') + test.end() + } catch (err) { + Logger.error(`updateTransferSettlement failed with error - ${err}`) + test.pass('Error is expected') + test.end() + } + }) + + await transferSettlementTest.test('updateTransferSettlement should', async (test) => { + try { + const transferId = '154cbf04-bac7-444d-aa66-76f66126d7f5' + const status = 'success' + + sandbox.stub(Db, 'getKnex') + const knexFunc = sandbox.stub().returns(knexStub) + Object.assign(knexFunc, knexStub) + Db.getKnex.returns(knexFunc) + knexStub.where.onCall(0).callsArgOn(0, knexStub) + knexStub.where.onCall(0).returns(knexStub) + + knexStub.andWhere.onCall(0).callsArgOn(0, knexStub) + knexStub.andWhere.onCall(0).returns(knexStub) + knexStub.andWhere.onCall(1).returns(knexStub) + knexStub.insert.onCall(0).callsArgOn(0, knexStub) + knexStub.insert.onCall(0).returns(knexStub) + + knexStub.union.onCall(0).callsArgOn(0, knexStub) + knexStub.innerJoin.onCall(6).callsArgOn(1, knexStub) + knexStub.innerJoin.onCall(6).returns(knexStub) + knexStub.where.onCall(2).callsArgOn(0, knexStub) + knexStub.andWhere.onCall(2).callsArgOn(0, knexStub) + knexStub.innerJoin.onCall(7).callsArgOn(0, knexStub) + knexStub.innerJoin.onCall(7).returns(knexStub) + knexStub.where.onCall(4).callsArgOn(0, knexStub) + knexStub.where.onCall(4).returns(knexStub) + knexStub.union.onCall(1).callsArgOn(0, knexStub) + knexStub.union.onCall(1).returns(knexStub) + + knexStub.andWhere.onCall(4).callsArgOn(0, knexStub) + knexStub.innerJoin.onCall(14).callsArgOn(1, knexStub) + knexStub.innerJoin.onCall(14).returns(knexStub) + knexStub.where.onCall(4).callsArgOn(0, knexStub) + knexStub.where.onCall(4).returns(knexStub) + knexStub.andWhere.onCall(4).callsArgOn(0, knexStub) + knexStub.where.onCall(6).callsArgOn(0, knexStub) + knexStub.where.onCall(6).returns(knexStub) + knexStub.andWhere.onCall(6).callsArgOn(0, knexStub) + + knexStub.insert.onCall(2).callsArgOn(0, knexStub) + knexStub.insert.onCall(2).returns(knexStub) + knexStub.innerJoin.onCall(15).callsArgOn(0, knexStub) + knexStub.innerJoin.onCall(15).returns(knexStub) + + knexStub.where.onCall(8).callsArgOn(0, knexStub) + knexStub.where.onCall(8).returns(knexStub) + knexStub.andWhere.onCall(8).callsArgOn(0, knexStub) + knexStub.union.onCall(2).callsArgOn(0, knexStub) + knexStub.union.onCall(2).returns(knexStub) + knexStub.innerJoin.onCall(22).callsArgOn(1, knexStub) + knexStub.innerJoin.onCall(22).returns(knexStub) + knexStub.where.onCall(10).callsArgOn(0, knexStub) + knexStub.where.onCall(10).returns(knexStub) + + knexStub.andWhere.onCall(10).callsArgOn(0, knexStub) + knexStub.innerJoin.onCall(23).callsArgOn(1, knexStub) + knexStub.innerJoin.onCall(23).returns(knexStub) + + await Model.updateTransferSettlement(transferId, status) + test.ok('update the transfer Settlement') + // TODO add expectations + test.end() + } catch (err) { + Logger.error(`updateTransferSettlement failed with error - ${err}`) + test.fail() + test.end() + } + }) + + await transferSettlementTest.end() +}) From fadda852583e32be7f2df7c656b2909fe8d46bf6 Mon Sep 17 00:00:00 2001 From: vgenev Date: Sat, 23 Jan 2021 18:07:58 +0200 Subject: [PATCH 2/4] docker-compose.yaml and integration-runner.env fixed --- docker-compose.yml | 7 ++----- test/integration-runner.env | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e46d774a..3daeef44 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,10 +4,7 @@ services: build: context: . cache_from: - - mojaloop/ - - - latest + - mojaloop/central-settlement:latest container_name: cs_central-settlement command: - "sh" @@ -28,7 +25,7 @@ services: - ./docker/wait-for:/opt/wait-for central-ledger: - image: mojaloop/central-ledger:latest # mojaloop/central-ledger:latest # + image: mojaloop/central-ledger:latest container_name: cs_central-ledger command: - "sh" diff --git a/test/integration-runner.env b/test/integration-runner.env index dd3b67ad..4e215f2d 100755 --- a/test/integration-runner.env +++ b/test/integration-runner.env @@ -28,7 +28,7 @@ APP_DIR_TEST_INTEGRATION=${APP_DIR_TEST_RESULTS:-"$TEST_DIR/$INTEGRATION_DIR"} APP_DIR_TEST_RESULTS=${APP_DIR_TEST_RESULTS:-"$TEST_DIR/$RESULT_DIR"} TEST_RESULTS_FILE=${TEST_RESULTS_FILE:-"tape-integration.xml"} -TEST_CMD=${TEST_CMD:-"mkdir -p $APP_DIR_TEST_RESULTS; tape '${APP_DIR_TEST_INTEGRATION}/**/*.test.js'"} +TEST_CMD=${TEST_CMD:-"mkdir -p $APP_DIR_TEST_RESULTS; tape '${APP_DIR_TEST_INTEGRATION}/**/*.test.js' | tap-xunit > $APP_DIR_TEST_RESULTS/$TEST_RESULTS_FILE"} SIMULATOR_HOST=${SIMULATOR_HOST:-"simulator-int"} SIMULATOR_PORT=${SIMULATOR_PORT:-"8444"} From 7c88596329bd7e4d595ba2e30c88cec8e8c8c0ac Mon Sep 17 00:00:00 2001 From: vgenev Date: Tue, 2 Feb 2021 15:13:23 +0200 Subject: [PATCH 3/4] addressed some pr comments --- README.md | 2 +- package-lock.json | 447 +++++++++++-- package.json | 10 +- src/handlers/index.js | 4 +- src/handlers/transferSettlement/handler.js | 5 - test/integration/settlementTransfer | 665 -------------------- test/integration/settlementTransfer.test.js | 665 -------------------- 7 files changed, 396 insertions(+), 1402 deletions(-) delete mode 100644 test/integration/settlementTransfer delete mode 100644 test/integration/settlementTransfer.test.js diff --git a/README.md b/README.md index 6f7b1baf..a395231c 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Tests include code coverage via istanbul. See the test/ folder for testing scrip Running integration tests (narrow) - npm run test:int:new + npm run test:int:narrow ### Running Integration Tests interactively diff --git a/package-lock.json b/package-lock.json index 3aa0ead7..ecc6ac8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2146,6 +2146,15 @@ "tslib": "2.1.0" }, "dependencies": { + "@grpc/proto-loader": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", + "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", + "requires": { + "lodash.camelcase": "^4.3.0", + "protobufjs": "^6.8.6" + } + }, "@hapi/hapi": { "version": "20.0.3", "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-20.0.3.tgz", @@ -2176,10 +2185,225 @@ "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.0.tgz", "integrity": "sha512-llqoQTrAJDTXxG3c4Kz/uzhBS1TsmSBa/XG5SPcVXgmffHE1nFtyLIK0hNJHCB3EuBKT84adzd1hZNY9GJLWtg==" }, + "@mojaloop/central-services-metrics": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-metrics/-/central-services-metrics-9.5.0.tgz", + "integrity": "sha512-4wba5JCNhmevBEHAPl+BmMqTmfT/7lOxbuRlziyAFhcySrZpCQhINMwyGm1CmNlldsDtp8rHaL5inQzKAGsBXA==", + "requires": { + "prom-client": "11.5.3" + } + }, + "@mojaloop/central-services-shared": { + "version": "11.5.4", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-11.5.4.tgz", + "integrity": "sha512-A2PY8U+sQtfJtg84nPLrnGXIDhFCUaTDbTpuv2rtTWFyXNv0s9PB2YtA09aLKtZ3nf5JKs+D6L8qwgP2T1v+Nw==", + "requires": { + "@hapi/catbox": "11.1.1", + "@hapi/catbox-memory": "5.0.0", + "@mojaloop/central-services-error-handling": "11.0.0", + "@mojaloop/central-services-logger": "10.6.0", + "@mojaloop/central-services-metrics": "9.5.0", + "@mojaloop/event-sdk": "10.6.0", + "ajv": "6.12.6", + "ajv-keywords": "3.5.2", + "axios": "0.21.1", + "base64url": "3.0.1", + "clone": "2.1.2", + "data-urls": "2.0.0", + "dotenv": "8.2.0", + "env-var": "7.0.0", + "event-stream": "4.0.1", + "immutable": "3.8.2", + "lodash": "4.17.20", + "mustache": "4.1.0", + "openapi-backend": "3.6.3", + "raw-body": "2.4.1", + "rc": "1.2.8", + "shins": "2.6.0", + "uuid4": "2.0.2", + "widdershins": "4.0.1", + "yaml": "1.10.0" + } + }, + "@mojaloop/event-sdk": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/@mojaloop/event-sdk/-/event-sdk-10.6.0.tgz", + "integrity": "sha512-mDVow/3WDILDUF2v32fqcOZAoRQCOZX8D2fJF3kHvZLGthU9ydNPHK118aVibw76XAyq6E6UbxHMXg3ZUPBlhg==", + "requires": { + "@grpc/proto-loader": "0.5.4", + "@mojaloop/central-services-logger": "10.6.0", + "brototype": "0.0.6", + "error-callsites": "2.0.3", + "grpc": "1.24.3", + "lodash": "4.17.19", + "moment": "2.27.0", + "parse-strings-in-object": "2.0.0", + "protobufjs": "6.9.0", + "rc": "1.2.8", + "serialize-error": "4.1.0", + "sinon": "9.0.2", + "traceparent": "1.0.0", + "tslib": "2.0.0", + "uuid4": "2.0.2", + "winston": "3.3.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + }, + "tslib": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", + "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" + } + } + }, + "@sinonjs/formatio": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", + "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^5.0.2" + } + }, + "@sinonjs/samsam": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@types/node": { + "version": "13.13.40", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.40.tgz", + "integrity": "sha512-eKaRo87lu1yAXrzEJl0zcJxfUMDT5/mZalFyOkT44rnQps41eS2pfWzbaulSPpQLFNy29bFqn+Y5lOTL8ATlEQ==" + }, + "error-callsites": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/error-callsites/-/error-callsites-2.0.3.tgz", + "integrity": "sha512-v036z4IEffZFE5kBkV5/F2MzhLnG0vuDyN+VXpzCf4yWXvX/1WJCI0A+TGTr8HWzBfCw5k8gr9rwAo09V+obTA==" + }, + "grpc": { + "version": "1.24.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.3.tgz", + "integrity": "sha512-EDemzuZTfhM0hgrXqC4PtR76O3t+hTIYJYR5vgiW0yt2WJqo4mhxUqZUirzUQz34Psz7dbLp38C6Cl7Ij2vXRQ==", + "requires": { + "@types/bytebuffer": "^5.0.40", + "lodash.camelcase": "^4.3.0", + "lodash.clone": "^4.5.0", + "nan": "^2.13.2", + "node-pre-gyp": "^0.15.0", + "protobufjs": "^5.0.3" + }, + "dependencies": { + "protobufjs": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", + "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", + "requires": { + "ascli": "~1", + "bytebuffer": "~5", + "glob": "^7.0.5", + "yargs": "^3.10.0" + } + } + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "moment": { + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", + "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==" + }, + "nise": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", + "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "requires": { + "fn.name": "1.x.x" + } + }, + "protobufjs": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.9.0.tgz", + "integrity": "sha512-LlGVfEWDXoI/STstRDdZZKb/qusoAWUnmLg9R8OLSO473mBLWHowx8clbX5/+mKDEI+v7GzjoK9tRPZMMcoTrg==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": "^13.7.0", + "long": "^4.0.0" + } + }, + "sinon": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", + "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==", + "requires": { + "@sinonjs/commons": "^1.7.2", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/formatio": "^5.0.1", + "@sinonjs/samsam": "^5.0.3", + "diff": "^4.0.2", + "nise": "^4.0.1", + "supports-color": "^7.1.0" + } + }, "tslib": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" + }, + "winston": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.3.3.tgz", + "integrity": "sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==", + "requires": { + "@dabh/diagnostics": "^2.0.2", + "async": "^3.1.0", + "is-stream": "^2.0.0", + "logform": "^2.2.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.4.0" + } } } }, @@ -2233,9 +2457,9 @@ } }, "@mojaloop/central-services-shared": { - "version": "11.5.4", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-11.5.4.tgz", - "integrity": "sha512-A2PY8U+sQtfJtg84nPLrnGXIDhFCUaTDbTpuv2rtTWFyXNv0s9PB2YtA09aLKtZ3nf5JKs+D6L8qwgP2T1v+Nw==", + "version": "11.5.5", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-11.5.5.tgz", + "integrity": "sha512-yWoylUSs27Hagf8Cj8itwKaxGJB4mGwsmQGF10y0gppfmhZtQ+gSIBFbGiefGjWuLPyNW8gJKB0vR/mTPxx/DQ==", "requires": { "@hapi/catbox": "11.1.1", "@hapi/catbox-memory": "5.0.0", @@ -2331,9 +2555,9 @@ } }, "@types/node": { - "version": "13.13.39", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.39.tgz", - "integrity": "sha512-wct+WgRTTkBm2R3vbrFOqyZM5w0g+D8KnhstG9463CJBVC3UVZHMToge7iMBR1vDl/I+NWFHUeK9X+JcF0rWKw==" + "version": "13.13.40", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.40.tgz", + "integrity": "sha512-eKaRo87lu1yAXrzEJl0zcJxfUMDT5/mZalFyOkT44rnQps41eS2pfWzbaulSPpQLFNy29bFqn+Y5lOTL8ATlEQ==" }, "error-callsites": { "version": "2.0.3", @@ -2766,13 +2990,13 @@ } }, "@npmcli/move-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.0.tgz", - "integrity": "sha512-Iv2iq0JuyYjKeFkSR4LPaCdDZwlGK9X2cP/01nJcp3yMJ1FjNd9vpiEYvLUgzBxKPg2SFmaOhizoQsPc0LWeOQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.1.tgz", + "integrity": "sha512-LtWTicuF2wp7PNTuyCwABx7nNG+DnzSE8gN0iWxkC6mpgm/iOPu0ZMTkXuCxmJxtWFsDxUaixM9COSNJEMUfuQ==", "dev": true, "requires": { "mkdirp": "^1.0.4", - "rimraf": "^2.7.1" + "rimraf": "^3.0.2" }, "dependencies": { "mkdirp": { @@ -2780,6 +3004,15 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } } } }, @@ -3846,9 +4079,9 @@ }, "dependencies": { "core-js": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.2.tgz", - "integrity": "sha512-FfApuSRgrR6G5s58casCBd9M2k+4ikuu4wbW6pJyYU7bd9zvFc9qf7vr5xmrZOhT9nn+8uwlH1oRR9jTnFoA3A==" + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.3.tgz", + "integrity": "sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q==" } } }, @@ -5862,9 +6095,9 @@ } }, "eslint": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz", - "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==", + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.19.0.tgz", + "integrity": "sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -6945,9 +7178,9 @@ "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, "fastq": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.10.0.tgz", - "integrity": "sha512-NL2Qc5L3iQEsyYzweq7qfgy5OtXCmGzGvhElGEd/SoFWEMOEczNh5s5ocaF01HDetxz+p8ecjNPA6cZxxIHmzA==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.10.1.tgz", + "integrity": "sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -7185,9 +7418,9 @@ } }, "flatted": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", - "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", "dev": true }, "fn.name": { @@ -12531,9 +12764,9 @@ } }, "npm-check-updates": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-11.0.2.tgz", - "integrity": "sha512-Ck+9Yq6B/N50y6lmGN0bLX1/TEseb/0xTWSAbfia1NVDH2uAzcAhwAgJbkOTqQuM+O6KC80liXTk8tC1w2PKOA==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-11.1.1.tgz", + "integrity": "sha512-0K2csepXxqXd3sh05qxU9BcW/pvFBatlM6E4UKKVFe6XlGjQXo4TfI5vRT4uZLG0v2Zj/bWUouQiZvEg5iAFHA==", "dev": true, "requires": { "chalk": "^4.1.0", @@ -12564,6 +12797,12 @@ "update-notifier": "^5.0.1" }, "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -12579,6 +12818,28 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "boxen": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.0.tgz", + "integrity": "sha512-5bvsqw+hhgUi3oYGK0Vf4WpIkyemp60WBInn7+WNfoISzAqk/HX4L7WNROq38E6UR/y3YADpv6pEm4BfkeEAdA==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.0", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + } + }, + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -12620,6 +12881,15 @@ "path-exists": "^4.0.0" } }, + "global-dirs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz", + "integrity": "sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==", + "dev": true, + "requires": { + "ini": "2.0.0" + } + }, "globby": { "version": "11.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", @@ -12635,9 +12905,9 @@ } }, "hosted-git-info": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz", - "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -12649,6 +12919,28 @@ "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", "dev": true }, + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "requires": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + } + }, "is-npm": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", @@ -12725,28 +13017,65 @@ "lru-cache": "^6.0.0" } }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, "update-notifier": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.0.1.tgz", - "integrity": "sha512-BuVpRdlwxeIOvmc32AGYvO1KVdPlsmqSh8KDDBxS6kDE5VR7R8OMP1d8MdhaVBvxl4H3551k9akXr0Y1iIB2Wg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", "dev": true, "requires": { - "boxen": "^4.2.0", + "boxen": "^5.0.0", "chalk": "^4.1.0", "configstore": "^5.0.1", "has-yarn": "^2.1.0", "import-lazy": "^2.1.0", "is-ci": "^2.0.0", - "is-installed-globally": "^0.3.2", + "is-installed-globally": "^0.4.0", "is-npm": "^5.0.0", "is-yarn-global": "^0.3.0", "latest-version": "^5.1.0", "pupa": "^2.1.1", - "semver": "^7.3.2", + "semver": "^7.3.4", "semver-diff": "^3.1.1", "xdg-basedir": "^4.0.0" } }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -12807,9 +13136,9 @@ }, "dependencies": { "hosted-git-info": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz", - "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz", + "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -13193,13 +13522,13 @@ } }, "oas-resolver": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.3.tgz", - "integrity": "sha512-y4gP5tabqP3YcNVHNAEJAlcqZ40Y9lxemzmXvt54evbrvuGiK5dEhuE33Rf+191TOwzlxMoIgbwMYeuOM7BwjA==", + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/oas-resolver/-/oas-resolver-2.5.4.tgz", + "integrity": "sha512-1vIj5Wkjmi+kZj5sFamt95LkuXoalmoKUohtaUQoCQZjLfPFaY8uZ7nw6IZaWuE6eLON2b6xrXhxD4hiTdYl0g==", "requires": { "node-fetch-h2": "^2.3.0", "oas-kit-common": "^1.0.8", - "reftools": "^1.1.7", + "reftools": "^1.1.8", "yaml": "^1.10.0", "yargs": "^16.1.1" }, @@ -13545,9 +13874,9 @@ }, "dependencies": { "@apidevtools/json-schema-ref-parser": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz", - "integrity": "sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==", + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.7.tgz", + "integrity": "sha512-QdwOGF1+eeyFh+17v2Tz626WX0nucd1iKOm6JUTUvCZdbolblCOOQCxGrQPY0f7jEhn36PiAWqZnsC2r5vmUWg==", "requires": { "@jsdevtools/ono": "^7.1.3", "call-me-maybe": "^1.0.1", @@ -13790,9 +14119,9 @@ } }, "pacote": { - "version": "11.2.3", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-11.2.3.tgz", - "integrity": "sha512-Jphxyk1EjGyLzNwa+MkbcQUQeTIqlKcIoPq0t9ekR9ZxsTGjzhRjz/cOoL9PTVkqAW1FH7qBoVbYL4FqQGNNJg==", + "version": "11.2.4", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-11.2.4.tgz", + "integrity": "sha512-GfTeVQGJ6WyBQbQD4t3ocHbyOmTQLmWjkCKSZPmKiGFKYKNUaM5U2gbLzUW8WG1XmS9yQFnsTFA0k3o1+q4klQ==", "dev": true, "requires": { "@npmcli/git": "^2.0.1", @@ -14714,9 +15043,9 @@ } }, "reftools": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.7.tgz", - "integrity": "sha512-I+KZFkQvZjMZqVWxRezTC/kQ2kLhGRZ7C+4ARbgmb5WJbvFUlbrZ/6qlz6mb+cGcPNYib+xqL8kZlxCsSZ7Hew==" + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/reftools/-/reftools-1.1.8.tgz", + "integrity": "sha512-Yvz9NH8uFHzD/AXX82Li1GdAP6FzDBxEZw+njerNBBQv/XHihqsWAjNfXtaq4QD2l4TEZVnp4UbktdYSegAM3g==" }, "regenerator-runtime": { "version": "0.13.7", @@ -16145,9 +16474,9 @@ } }, "ssri": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", - "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "dev": true, "requires": { "minipass": "^3.1.1" @@ -16806,9 +17135,9 @@ } }, "supertest": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.1.1.tgz", - "integrity": "sha512-3WDAWfqdNifCURjGUHZFv3u5nMg5tFtFRCTJOcSZXdlYZ0gqVF3UMhA7IJDP8nDXnR3gocbQ6s0bpiPnsoFeQw==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.1.3.tgz", + "integrity": "sha512-v2NVRyP73XDewKb65adz+yug1XMtmvij63qIWHZzSX8tp6wiq6xBLUy4SUAd2NII6wIipOmHT/FD9eicpJwdgQ==", "dev": true, "requires": { "methods": "^1.1.2", @@ -17099,9 +17428,9 @@ }, "dependencies": { "ajv": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz", - "integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.4.tgz", + "integrity": "sha512-xzzzaqgEQfmuhbhAoqjJ8T/1okb6gAzXn/eQRNpAN1AEUoHJTNF9xCDRTtf/s3SKldtZfa+RJeTs+BQq+eZ/sw==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", diff --git a/package.json b/package.json index 7b0b4a8c..2b069f93 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@mojaloop/central-services-error-handling": "11.0.0", "@mojaloop/central-services-health": "11.0.0", "@mojaloop/central-services-logger": "10.6.0", - "@mojaloop/central-services-shared": "11.5.4", + "@mojaloop/central-services-shared": "11.5.5", "@mojaloop/central-services-stream": "10.6.0", "@mojaloop/ml-number": "11.0.0", "@now-ims/hapi-now-auth": "2.0.2", @@ -63,18 +63,18 @@ "chai-subset": "1.6.0", "jest": "26.6.3", "jest-junit": "12.0.0", - "eslint": "7.18.0", + "eslint": "7.19.0", "faucet": "0.0.1", "get-port": "5.1.1", "node-fetch": "2.6.1", "nodemon": "2.0.7", "npm-audit-resolver": "2.2.1", - "npm-check-updates": "11.0.2", + "npm-check-updates": "11.1.1", "nyc": "15.1.0", "pre-commit": "1.2.2", "proxyquire": "2.1.3", "rewire": "5.0.0", - "supertest": "6.1.1", + "supertest": "6.1.3", "sinon": "9.2.4", "standard": "16.0.3", "swagmock": "1.0.0", @@ -103,7 +103,7 @@ "test:coverage-check": "npm run test:coverage && nyc check-coverage", "test:int": "tape 'test/integration/**/*.test.js'", "test:integration": "sh ./test/integration-runner.sh ./test/integration-runner.env", - "test:int:new": "jest --config './jest.integration.config.js' --coverage --runInBand --testMatch '**/test/int/**/*.(test|spec).js'", + "test:int:narrow": "jest --config './jest.integration.config.js' --coverage --runInBand --testMatch '**/test/int/**/*.(test|spec).js'", "audit:resolve": "SHELL=sh resolve-audit --production", "audit:check": "SHELL=sh check-audit --production", "dep:check": "npx ncu -e 2", diff --git a/src/handlers/index.js b/src/handlers/index.js index 14a8846b..eca94e45 100644 --- a/src/handlers/index.js +++ b/src/handlers/index.js @@ -55,7 +55,7 @@ Program.command('handler') // sub-command name, coffeeType = type, required // function to execute when command is used .action(async (args) => { const handlerList = [] - if (args.settlementwindow && typeof args.settlementwindow === 'boolean') { + if (args.settlementwindow === true) { Logger.debug('CLI: Executing --settlementwindow') const handler = { type: 'settlementwindow', @@ -64,7 +64,7 @@ Program.command('handler') // sub-command name, coffeeType = type, required handlerList.push(handler) } - if (args.transfersettlement && typeof args.transfersettlement === 'boolean') { + if (args.transfersettlement === true) { Logger.debug('CLI: Executing --transfersettlement') const handler = { type: 'transfersettlement', diff --git a/src/handlers/transferSettlement/handler.js b/src/handlers/transferSettlement/handler.js index 65537145..3d814efa 100644 --- a/src/handlers/transferSettlement/handler.js +++ b/src/handlers/transferSettlement/handler.js @@ -44,7 +44,6 @@ const transferSettlementService = require('../../domain/transferSettlement') const scriptsLoader = require('../../lib/scriptsLoader') const Utility = require('@mojaloop/central-services-shared').Util const Db = require('../../lib/db') -const SettlementModelModel = require('../../models/settlement/settlementModel.js') const LOG_LOCATION = { module: 'TransferFulfilHandler', method: '', path: '' } // var object used as pointer const CONSUMER_COMMIT = true const FROM_SWITCH = true @@ -58,10 +57,7 @@ const RETRY_OPTIONS = { const SCRIPTS_FOLDER = Config.HANDLERS.SETTINGS.SCRIPTS_FOLDER let INJECTED_SCRIPTS = {} -let MODEL_IS_CGS = false - async function processTransferSettlement (error, messages) { - if (!MODEL_IS_CGS) return true if (error) { Logger.error(error) throw ErrorHandling.Factory.reformatFSPIOPError(error) @@ -134,7 +130,6 @@ async function processTransferSettlement (error, messages) { async function registerTransferSettlement () { try { INJECTED_SCRIPTS = scriptsLoader.loadScripts(SCRIPTS_FOLDER) - MODEL_IS_CGS = await SettlementModelModel.getByName('CGS') const transferFulfillHandler = { command: processTransferSettlement, topicName: Kafka.transformGeneralTopicName(Config.KAFKA_CONFIG.TOPIC_TEMPLATES.GENERAL_TOPIC_TEMPLATE.TEMPLATE, Enum.Events.Event.Type.NOTIFICATION, Enum.Events.Event.Action.EVENT), diff --git a/test/integration/settlementTransfer b/test/integration/settlementTransfer deleted file mode 100644 index 8865b187..00000000 --- a/test/integration/settlementTransfer +++ /dev/null @@ -1,665 +0,0 @@ -/***** - License - -------------- - Copyright © 2017 Bill & Melinda Gates Foundation - The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. - Contributors - -------------- - This is the official list of the Mojaloop project contributors for this file. - Names of the original copyright holders (individuals or organizations) - should be listed with a '*' in the first column. People who have - contributed from an organization can be listed under the organization - that actually holds the copyright for their contributions (see the - Gates Foundation organization for an example). Those individuals should have - their names indented and be marked with a '-'. Email address can be added - optionally within square brackets . - * Gates Foundation - - Name Surname - - * ModusBox - - Georgi Georgiev - -------------- - ******/ -'use strict' - -const Test = require('tapes')(require('tape')) -const Sinon = require('sinon') -const Logger = require('@mojaloop/central-services-logger') -const MLNumber = require('@mojaloop/ml-number') -const TransferData = require('./helpers/transferData') -const Models = require('./helpers/models') -const Config = require('../../src/lib/config') -const Db = require('../../src/lib/db') -const CLDb = require('@mojaloop/central-ledger/src/lib/db') -const SettlementWindowService = require('../../src/domain/settlementWindow') -const SettlementService = require('../../src/domain/settlement') -const Enums = require('../../src/models/lib/enums') -const SettlementWindowStateChangeModel = require('../../src/models/settlementWindow/settlementWindowStateChange') -const SettlementModel = require('../../src/models/settlement/settlement') -const SettlementModelModel = require('../../src/models/settlement/settlementModel') -const SettlementStateChangeModel = require('../../src/models/settlement/settlementStateChange') -const SettlementParticipantCurrencyModel = require('../../src/models/settlement/settlementParticipantCurrency') -const TransferModel = require('@mojaloop/central-ledger/src/models/transfer/transfer') -const TransferStateChangeModel = require('@mojaloop/central-ledger/src/models/transfer/transferStateChange') -const ParticipantPositionModel = require('@mojaloop/central-ledger/src/models/position/participantPosition') -const Producer = require('../../src/lib/kafka/producer') -const StreamProducer = require('@mojaloop/central-services-stream').Util.Producer -// require('leaked-handles').set({ fullStack: true, timeout: 5000, debugSockets: true }) - -const currency = 'USD' -let netSettlementSenderId -let netSenderAccountId -let netSettlementRecipientId -let netRecipientAccountId -let netSettlementAmount -let netSenderSettlementTransferId -let netRecipientSettlementTransferId - -const settlementModels = [ - { - name: 'DEFERRED_NET', - settlementGranularityId: 2, // NET - settlementInterchangeId: 2, // MULTILATERAL - settlementDelayId: 2, // DEFERRED - ledgerAccountTypeId: 1, // POSITION - autoPositionReset: true, - currencyId: null - }, - { - name: 'DEFERRED_NET_USD', - settlementGranularityId: 2, // NET - settlementInterchangeId: 2, // MULTILATERAL - settlementDelayId: 2, // DEFERRED - ledgerAccountTypeId: 1, // POSITION - autoPositionReset: true, - currencyId: 'USD' - } -] - -const getEnums = async () => { - return { - ledgerAccountTypes: await Enums.ledgerAccountTypes(), - ledgerEntryTypes: await Enums.ledgerEntryTypes(), - participantLimitTypes: await Enums.participantLimitTypes(), - settlementDelay: await Enums.settlementDelay(), - settlementGranularity: await Enums.settlementGranularity(), - settlementInterchange: await Enums.settlementInterchange(), - settlementStates: await Enums.settlementStates(), - settlementWindowStates: await Enums.settlementWindowStates(), - transferParticipantRoleTypes: await Enums.transferParticipantRoleTypes(), - transferStates: await Enums.transferStates() - } -} - -TransferData.setup() - -Test('SettlementTransfer should', async settlementTransferTest => { - await Db.connect(Config.DATABASE) - await CLDb.connect(Config.DATABASE) - - const enums = await getEnums() - let settlementWindowId - let settlementData - - let sandbox - settlementTransferTest.beforeEach(test => { - sandbox = Sinon.createSandbox() - test.end() - }) - settlementTransferTest.afterEach(test => { - sandbox.restore() - test.end() - }) - - await settlementTransferTest.test('init settlement models for integration testing:', async test => { - try { - for (const model of settlementModels) { - const record = await SettlementModelModel.getByName(model.name) - if (record && record.name === model.name) { - model.settlementModelId = record.settlementModelId - test.pass(`Settlement model ${model.name} already exists`) - } else { - const id = await Models.settlementModel.create(model) - const record1 = await SettlementModelModel.getByName(model.name) - if (record1 && record1.name === model.name && record1.settlementModelId === id) { - model.settlementModelId = id - test.pass(`Settlement model ${model.name} has been successfully inserted with id = ${id}`) - } else { - throw new Error(`Settlement model ${model.name} could not be instantiated`) - } - } - } - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('close the current window:', async test => { - try { - let params = { query: { state: enums.settlementWindowStates.OPEN } } - const res1 = await SettlementWindowService.getByParams(params) // method to be verified - settlementWindowId = res1[0].settlementWindowId - test.ok(settlementWindowId > 0, 'retrieve the OPEN window') - - params = { settlementWindowId: settlementWindowId, state: enums.settlementWindowStates.CLOSED, reason: 'text' } - const res2 = await SettlementWindowService.process(params, enums.settlementWindowStates) - const res3 = await SettlementWindowService.close(params.settlementWindowId, params.reason) - test.ok(res3, 'close settlement window operation success') - - const closedWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - const openWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(res2.settlementWindowId) - test.equal(closedWindow.settlementWindowStateId, enums.settlementWindowStates.CLOSED, `window id ${settlementWindowId} is CLOSED`) - test.equal(openWindow.settlementWindowStateId, enums.settlementWindowStates.OPEN, `window id ${res2.settlementWindowId} is OPEN`) - - for (const currency of TransferData.currencies) { - const settlementWindowContentData = await Models.settlementWindowContent.getByParams({ settlementWindowId, currencyId: currency }) - const id = settlementWindowContentData[0].settlementWindowContentId - test.equal(settlementWindowContentData.length, 1, `window content id ${id} has been created`) - test.equal(settlementWindowContentData[0].settlementId, null, `window content id ${id} has not been assigned to a settlement yet`) - - const settlementWindowContentStateChange = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(id) - test.equal(settlementWindowContentStateChange.settlementWindowStateId, 'CLOSED', `window content id ${id} state is CLOSED`) - test.equal(settlementWindowContentStateChange.settlementWindowContentStateChangeId, settlementWindowContentData[0].currentStateChangeId, 'state pointer is up-to-date') - - const settlementContentAggregationData = await Models.settlementWindowContentAggregation.getBySettlementWindowContentId(id) - test.ok(settlementContentAggregationData.length > 0, `a total of ${settlementContentAggregationData.length} content aggregation records have been generated for window content ${id}`) - for (const sca of settlementContentAggregationData) { - test.equal(sca.currentStateId, 'CLOSED', `content aggregation id ${sca.settlementContentAggregationId} state is CLOSED`) - test.equal(sca.settlementId, null, `content aggregation id ${sca.settlementContentAggregationId} has not been assigned to a settlement yet`) - } - } - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('create a settlement:', async test => { - try { - const params = { - settlementModel: settlementModels[1].name, - reason: 'reason', - settlementWindows: [ - { - id: settlementWindowId - } - ] - } - settlementData = await SettlementService.settlementEventTrigger(params, enums) // method to be verified - test.ok(settlementData, 'settlementEventTrigger operation success') - - const sId = settlementData.id - test.equal(settlementData.settlementWindows.length, 1, `settlement id ${sId} holds one window`) - test.ok(settlementData.settlementWindows[0].content.length > 0, 'settlement window has content') - test.equal(settlementData.settlementWindows[0].content[0].state, 'PENDING_SETTLEMENT', 'settlement window content state is PENDING_SETTLEMENT') - - const swcId = settlementData.settlementWindows[0].content[0].id - const settlementWindowContent = await Models.settlementWindowContent.getById(swcId) - test.equal(settlementWindowContent.settlementId, settlementData.id, `window content id ${swcId} has been assigned to settlement id ${sId}`) - - const settlementWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - test.equal(settlementWindow.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, `window id ${settlementWindowId} is PENDING_SETTLEMENT`) - - const settlement = await SettlementModel.getById(settlementData.id) - test.ok(settlement, `create settlement with id ${settlementData.id}`) - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.PENDING_SETTLEMENT, 'settlement state is PENDING_SETTLEMENT') - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('PS_TRANSFERS_RECORDED for PAYER:', async test => { - try { - // read and store settlement participant and account data needed in remaining tests - let participantFilter = settlementData.participants.filter(participant => { - return participant.accounts.find(account => { - if (account.netSettlementAmount.currency === currency && account.netSettlementAmount.amount > 0) { - netSenderAccountId = account.id - netSettlementAmount = account.netSettlementAmount.amount - return true - } - return false - }) - }) - netSettlementSenderId = participantFilter[0].id - participantFilter = settlementData.participants.filter(participant => { - return participant.accounts.find(account => { - if (account.netSettlementAmount.currency === currency && account.netSettlementAmount.amount < 0) { - netRecipientAccountId = account.id - return true - } - return false - }) - }) - netSettlementRecipientId = participantFilter[0].id - // data retrieved and stored into module scope variables - - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: 'Transfers recorded for payer', - state: enums.settlementStates.PS_TRANSFERS_RECORDED - } - ] - } - ] - } - const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified - test.ok(res, 'settlement putById operation successful') - - const settlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(settlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, 'record for payer changed to PS_TRANSFERS_RECORDED') - - netSenderSettlementTransferId = settlementParticipantCurrencyRecord.settlementTransferId - - const transferRecord = await TransferModel.getById(netSenderSettlementTransferId) - test.ok(transferRecord, 'settlement transfer is created for payer') - - const transferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) - test.equal(transferStateChangeRecord.transferStateId, enums.transferStates.RECEIVED_PREPARE, 'settlement transfer for payer is RECEIVED_PREPARE') - - const transferParticipantRecords = await Models.getTransferParticipantsByTransferId(netSenderSettlementTransferId) - const hubTransferParticipant = transferParticipantRecords.find(record => { - return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.HUB - }) - const payerTransferParticipant = transferParticipantRecords.find(record => { - return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.DFSP_POSITION - }) - test.ok(payerTransferParticipant.amount < 0, `DR settlement transfer for SETTLEMENT_NET_SENDER is negative for payer ${payerTransferParticipant.amount}`) - test.ok(hubTransferParticipant.amount > 0, `CR settlement transfer for SETTLEMENT_NET_SENDER is positive for hub ${hubTransferParticipant.amount}`) - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('PS_TRANSFERS_RECORDED for PAYEE:', async test => { - try { - const externalReferenceSample = 'tr0123456789' - const params = { - participants: [ - { - id: netSettlementRecipientId, - accounts: [ - { - id: netRecipientAccountId, - reason: 'Transfers recorded for payee', - state: enums.settlementStates.PS_TRANSFERS_RECORDED, - externalReference: externalReferenceSample - } - ] - } - ] - } - const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified - test.ok(res, 'settlement putById operation successful') - - const settlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) - test.equal(settlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, 'record for payee changed to PS_TRANSFERS_RECORDED') - test.equal(settlementParticipantCurrencyRecord.externalReference, externalReferenceSample, 'external reference is recorded') - - netRecipientSettlementTransferId = settlementParticipantCurrencyRecord.settlementTransferId - const transferRecord = await TransferModel.getById(netRecipientSettlementTransferId) - test.ok(transferRecord, 'settlement transfer is created for payee') - - const transferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) - test.equal(transferStateChangeRecord.transferStateId, enums.transferStates.RECEIVED_PREPARE, 'settlement transfer for payee is RECEIVED_PREPARE') - - const transferParticipantRecords = await Models.getTransferParticipantsByTransferId(netRecipientSettlementTransferId) - const hubTransferParticipant = transferParticipantRecords.find(record => { - return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.HUB - }) - const payeeTransferParticipant = transferParticipantRecords.find(record => { - return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.DFSP_POSITION - }) - test.ok(hubTransferParticipant.amount < 0, `DR settlement transfer for SETTLEMENT_NET_RECIPIENT is negative for hub ${hubTransferParticipant.amount}`) - test.ok(payeeTransferParticipant.amount > 0, `CR settlement transfer for SETTLEMENT_NET_RECIPIENT is positive for payer ${payeeTransferParticipant.amount}`) - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, 'settlement state is PS_TRANSFERS_RECORDED') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('PS_TRANSFERS_RESERVED for PAYER & PAYEE:', async test => { - try { - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: 'Transfers reserved for payer & payee', - state: enums.settlementStates.PS_TRANSFERS_RESERVED - } - ] - }, - { - id: netSettlementRecipientId, - accounts: [ - { - id: netRecipientAccountId, - reason: 'Transfers reserved for payer & payee', - state: enums.settlementStates.PS_TRANSFERS_RESERVED - } - ] - } - ] - } - const initialPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value - const initialPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value - - const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified - test.ok(res, 'settlement putById operation successful') - - const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, 'record for payer changed to PS_TRANSFERS_RESERVED') - - const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) - test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, 'record for payee changed to PS_TRANSFERS_RESERVED') - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, 'settlement state is PS_TRANSFERS_RESERVED') - - const payerTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) - test.equal(payerTransferStateChangeRecord.transferStateId, enums.transferStates.RESERVED, 'settlement transfer for payer is RESERVED') - - const payeeTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) - test.equal(payeeTransferStateChangeRecord.transferStateId, enums.transferStates.RESERVED, 'settlement transfer for payee is RESERVED') - - const currentPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value - test.equal(currentPayerPosition, initialPayerPosition, 'position for NET_SETTLEMENT_SENDER is not changed') - - const currentPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value - test.equal(currentPayeePosition, new MLNumber(initialPayeePosition).add(netSettlementAmount).toNumber(), 'position for NET_SETTLEMENT_RECIPIENT is adjusted') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('PS_TRANSFERS_COMMITTED for PAYER & PAYEE:', async test => { - try { - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: 'Transfers committed for payer & payee', - state: enums.settlementStates.PS_TRANSFERS_COMMITTED - } - ] - }, - { - id: netSettlementRecipientId, - accounts: [ - { - id: netRecipientAccountId, - reason: 'Transfers committed for payer & payee', - state: enums.settlementStates.PS_TRANSFERS_COMMITTED - } - ] - } - ] - } - const initialPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value - const initialPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value - - const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified - test.ok(res, 'settlement putById operation successful') - - const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, 'record for payer changed to PS_TRANSFERS_COMMITTED') - - const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) - test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, 'record for payee changed to PS_TRANSFERS_COMMITTED') - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, 'settlement state is PS_TRANSFERS_COMMITTED') - - const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, 'window is still PENDING_SETTLEMENT') - - const payerTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) - test.equal(payerTransferStateChangeRecord.transferStateId, enums.transferStates.COMMITTED, 'settlement transfer for payer is COMMITTED') - - const payeeTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) - test.equal(payeeTransferStateChangeRecord.transferStateId, enums.transferStates.COMMITTED, 'settlement transfer for payee is COMMITTED') - - const currentPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value - test.equal(currentPayerPosition, initialPayerPosition - netSettlementAmount, 'position for NET_SETTLEMENT_SENDER is adjusted') - - const currentPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value - test.equal(currentPayeePosition, initialPayeePosition, 'position for NET_SETTLEMENT_RECIPIENT is unchanged') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('SETTLED for PAYER', async test => { - try { - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: 'Transfers settled for payer', - state: enums.settlementStates.SETTLED - } - ] - } - ] - } - - const res = await SettlementService.putById(settlementData.id, params, enums) - test.ok(res, 'settlement putById operation successful') - - const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.SETTLED, 'record for payer changed to SETTLED') - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLING, 'settlement state is SETTLING') - - const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, 'window is still PENDING_SETTLEMENT') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('update SETTLED for PAYER with external reference', async test => { - try { - const externalReferenceSample = 'tr98765432109876543210' - const reasonSample = 'Additional reason for SETTLED account' - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: reasonSample, - state: enums.settlementStates.SETTLED, - externalReference: externalReferenceSample - } - ] - } - ] - } - - const res = await SettlementService.putById(settlementData.id, params, enums) - test.ok(res, 'settlement putById operation successful') - - const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(payerSettlementParticipantCurrencyRecord.reason, reasonSample, 'Reason recorded') - test.equal(payerSettlementParticipantCurrencyRecord.externalReference, externalReferenceSample, 'External reference recorded') - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('SETTLED for PAYEE', async test => { - try { - const params = { - participants: [ - { - id: netSettlementRecipientId, - accounts: [ - { - id: netRecipientAccountId, - reason: 'Payee: SETTLED, settlement: SETTLED', - state: enums.settlementStates.SETTLED - } - ] - } - ] - } - - const res = await SettlementService.putById(settlementData.id, params, enums) - test.ok(res, 'settlement putById operation successful') - - const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) - test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.SETTLED, 'record for payee changed to SETTLED') - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLED, 'settlement state is SETTLED') - - const windowContentState = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(res.settlementWindows[0].content[0].id) - test.equal(windowContentState.settlementWindowStateId, 'SETTLED', 'settlement window content state is SETTLED') - - const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, 'window is PENDING_SETTLEMENT because there is more window content to settle') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('create a settlement with previous window remaining content and settle it:', async test => { - try { - const settlementStates = [enums.settlementStates.PS_TRANSFERS_RECORDED, enums.settlementStates.PS_TRANSFERS_RESERVED, enums.settlementStates.PS_TRANSFERS_COMMITTED, enums.settlementStates.SETTLED] - - let params = { - settlementModel: settlementModels[0].name, - reason: 'reason', - settlementWindows: [ - { - id: settlementWindowId - } - ] - } - settlementData = await SettlementService.settlementEventTrigger(params, enums) - test.ok(settlementData, 'settlementEventTrigger operation success') - - let res - for (const state of settlementStates) { - params = { - participants: [ - { - id: settlementData.participants[0].id, - accounts: [ - { - id: settlementData.participants[0].accounts[0].id, - reason: `Settlement to ${state} state`, - state - } - ] - }, - { - id: settlementData.participants[1].id, - accounts: [ - { - id: settlementData.participants[1].accounts[0].id, - reason: `Settlement to ${state} state`, - state - } - ] - } - ] - } - res = await SettlementService.putById(settlementData.id, params, enums) - test.ok(res, `settlement putById operation success for ${state} state`) - } - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLED, 'settlement state is SETTLED') - - const windowContentState = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(res.settlementWindows[0].content[0].id) - test.equal(windowContentState.settlementWindowStateId, 'SETTLED', 'settlement window content state is SETTLED') - - const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(res.settlementWindows[0].id) - test.equal(window.settlementWindowStateId, enums.settlementWindowStates.SETTLED, 'window is SETTLED because there is no more window content to settle') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('finally disconnect open handles', async test => { - try { - await Db.disconnect() - await CLDb.disconnect() - test.pass('database connection closed') - await Producer.getProducer('topic-notification-event').disconnect() - test.pass('producer to topic-notification-event disconnected') - await StreamProducer.getProducer('topic-settlementwindow-close').disconnect() - test.pass('producer to topic-settlementwindow-close disconnected') - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - settlementTransferTest.end() -}) diff --git a/test/integration/settlementTransfer.test.js b/test/integration/settlementTransfer.test.js deleted file mode 100644 index 8865b187..00000000 --- a/test/integration/settlementTransfer.test.js +++ /dev/null @@ -1,665 +0,0 @@ -/***** - License - -------------- - Copyright © 2017 Bill & Melinda Gates Foundation - The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files 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, the Mojaloop files are 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. - Contributors - -------------- - This is the official list of the Mojaloop project contributors for this file. - Names of the original copyright holders (individuals or organizations) - should be listed with a '*' in the first column. People who have - contributed from an organization can be listed under the organization - that actually holds the copyright for their contributions (see the - Gates Foundation organization for an example). Those individuals should have - their names indented and be marked with a '-'. Email address can be added - optionally within square brackets . - * Gates Foundation - - Name Surname - - * ModusBox - - Georgi Georgiev - -------------- - ******/ -'use strict' - -const Test = require('tapes')(require('tape')) -const Sinon = require('sinon') -const Logger = require('@mojaloop/central-services-logger') -const MLNumber = require('@mojaloop/ml-number') -const TransferData = require('./helpers/transferData') -const Models = require('./helpers/models') -const Config = require('../../src/lib/config') -const Db = require('../../src/lib/db') -const CLDb = require('@mojaloop/central-ledger/src/lib/db') -const SettlementWindowService = require('../../src/domain/settlementWindow') -const SettlementService = require('../../src/domain/settlement') -const Enums = require('../../src/models/lib/enums') -const SettlementWindowStateChangeModel = require('../../src/models/settlementWindow/settlementWindowStateChange') -const SettlementModel = require('../../src/models/settlement/settlement') -const SettlementModelModel = require('../../src/models/settlement/settlementModel') -const SettlementStateChangeModel = require('../../src/models/settlement/settlementStateChange') -const SettlementParticipantCurrencyModel = require('../../src/models/settlement/settlementParticipantCurrency') -const TransferModel = require('@mojaloop/central-ledger/src/models/transfer/transfer') -const TransferStateChangeModel = require('@mojaloop/central-ledger/src/models/transfer/transferStateChange') -const ParticipantPositionModel = require('@mojaloop/central-ledger/src/models/position/participantPosition') -const Producer = require('../../src/lib/kafka/producer') -const StreamProducer = require('@mojaloop/central-services-stream').Util.Producer -// require('leaked-handles').set({ fullStack: true, timeout: 5000, debugSockets: true }) - -const currency = 'USD' -let netSettlementSenderId -let netSenderAccountId -let netSettlementRecipientId -let netRecipientAccountId -let netSettlementAmount -let netSenderSettlementTransferId -let netRecipientSettlementTransferId - -const settlementModels = [ - { - name: 'DEFERRED_NET', - settlementGranularityId: 2, // NET - settlementInterchangeId: 2, // MULTILATERAL - settlementDelayId: 2, // DEFERRED - ledgerAccountTypeId: 1, // POSITION - autoPositionReset: true, - currencyId: null - }, - { - name: 'DEFERRED_NET_USD', - settlementGranularityId: 2, // NET - settlementInterchangeId: 2, // MULTILATERAL - settlementDelayId: 2, // DEFERRED - ledgerAccountTypeId: 1, // POSITION - autoPositionReset: true, - currencyId: 'USD' - } -] - -const getEnums = async () => { - return { - ledgerAccountTypes: await Enums.ledgerAccountTypes(), - ledgerEntryTypes: await Enums.ledgerEntryTypes(), - participantLimitTypes: await Enums.participantLimitTypes(), - settlementDelay: await Enums.settlementDelay(), - settlementGranularity: await Enums.settlementGranularity(), - settlementInterchange: await Enums.settlementInterchange(), - settlementStates: await Enums.settlementStates(), - settlementWindowStates: await Enums.settlementWindowStates(), - transferParticipantRoleTypes: await Enums.transferParticipantRoleTypes(), - transferStates: await Enums.transferStates() - } -} - -TransferData.setup() - -Test('SettlementTransfer should', async settlementTransferTest => { - await Db.connect(Config.DATABASE) - await CLDb.connect(Config.DATABASE) - - const enums = await getEnums() - let settlementWindowId - let settlementData - - let sandbox - settlementTransferTest.beforeEach(test => { - sandbox = Sinon.createSandbox() - test.end() - }) - settlementTransferTest.afterEach(test => { - sandbox.restore() - test.end() - }) - - await settlementTransferTest.test('init settlement models for integration testing:', async test => { - try { - for (const model of settlementModels) { - const record = await SettlementModelModel.getByName(model.name) - if (record && record.name === model.name) { - model.settlementModelId = record.settlementModelId - test.pass(`Settlement model ${model.name} already exists`) - } else { - const id = await Models.settlementModel.create(model) - const record1 = await SettlementModelModel.getByName(model.name) - if (record1 && record1.name === model.name && record1.settlementModelId === id) { - model.settlementModelId = id - test.pass(`Settlement model ${model.name} has been successfully inserted with id = ${id}`) - } else { - throw new Error(`Settlement model ${model.name} could not be instantiated`) - } - } - } - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('close the current window:', async test => { - try { - let params = { query: { state: enums.settlementWindowStates.OPEN } } - const res1 = await SettlementWindowService.getByParams(params) // method to be verified - settlementWindowId = res1[0].settlementWindowId - test.ok(settlementWindowId > 0, 'retrieve the OPEN window') - - params = { settlementWindowId: settlementWindowId, state: enums.settlementWindowStates.CLOSED, reason: 'text' } - const res2 = await SettlementWindowService.process(params, enums.settlementWindowStates) - const res3 = await SettlementWindowService.close(params.settlementWindowId, params.reason) - test.ok(res3, 'close settlement window operation success') - - const closedWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - const openWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(res2.settlementWindowId) - test.equal(closedWindow.settlementWindowStateId, enums.settlementWindowStates.CLOSED, `window id ${settlementWindowId} is CLOSED`) - test.equal(openWindow.settlementWindowStateId, enums.settlementWindowStates.OPEN, `window id ${res2.settlementWindowId} is OPEN`) - - for (const currency of TransferData.currencies) { - const settlementWindowContentData = await Models.settlementWindowContent.getByParams({ settlementWindowId, currencyId: currency }) - const id = settlementWindowContentData[0].settlementWindowContentId - test.equal(settlementWindowContentData.length, 1, `window content id ${id} has been created`) - test.equal(settlementWindowContentData[0].settlementId, null, `window content id ${id} has not been assigned to a settlement yet`) - - const settlementWindowContentStateChange = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(id) - test.equal(settlementWindowContentStateChange.settlementWindowStateId, 'CLOSED', `window content id ${id} state is CLOSED`) - test.equal(settlementWindowContentStateChange.settlementWindowContentStateChangeId, settlementWindowContentData[0].currentStateChangeId, 'state pointer is up-to-date') - - const settlementContentAggregationData = await Models.settlementWindowContentAggregation.getBySettlementWindowContentId(id) - test.ok(settlementContentAggregationData.length > 0, `a total of ${settlementContentAggregationData.length} content aggregation records have been generated for window content ${id}`) - for (const sca of settlementContentAggregationData) { - test.equal(sca.currentStateId, 'CLOSED', `content aggregation id ${sca.settlementContentAggregationId} state is CLOSED`) - test.equal(sca.settlementId, null, `content aggregation id ${sca.settlementContentAggregationId} has not been assigned to a settlement yet`) - } - } - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('create a settlement:', async test => { - try { - const params = { - settlementModel: settlementModels[1].name, - reason: 'reason', - settlementWindows: [ - { - id: settlementWindowId - } - ] - } - settlementData = await SettlementService.settlementEventTrigger(params, enums) // method to be verified - test.ok(settlementData, 'settlementEventTrigger operation success') - - const sId = settlementData.id - test.equal(settlementData.settlementWindows.length, 1, `settlement id ${sId} holds one window`) - test.ok(settlementData.settlementWindows[0].content.length > 0, 'settlement window has content') - test.equal(settlementData.settlementWindows[0].content[0].state, 'PENDING_SETTLEMENT', 'settlement window content state is PENDING_SETTLEMENT') - - const swcId = settlementData.settlementWindows[0].content[0].id - const settlementWindowContent = await Models.settlementWindowContent.getById(swcId) - test.equal(settlementWindowContent.settlementId, settlementData.id, `window content id ${swcId} has been assigned to settlement id ${sId}`) - - const settlementWindow = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - test.equal(settlementWindow.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, `window id ${settlementWindowId} is PENDING_SETTLEMENT`) - - const settlement = await SettlementModel.getById(settlementData.id) - test.ok(settlement, `create settlement with id ${settlementData.id}`) - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.PENDING_SETTLEMENT, 'settlement state is PENDING_SETTLEMENT') - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('PS_TRANSFERS_RECORDED for PAYER:', async test => { - try { - // read and store settlement participant and account data needed in remaining tests - let participantFilter = settlementData.participants.filter(participant => { - return participant.accounts.find(account => { - if (account.netSettlementAmount.currency === currency && account.netSettlementAmount.amount > 0) { - netSenderAccountId = account.id - netSettlementAmount = account.netSettlementAmount.amount - return true - } - return false - }) - }) - netSettlementSenderId = participantFilter[0].id - participantFilter = settlementData.participants.filter(participant => { - return participant.accounts.find(account => { - if (account.netSettlementAmount.currency === currency && account.netSettlementAmount.amount < 0) { - netRecipientAccountId = account.id - return true - } - return false - }) - }) - netSettlementRecipientId = participantFilter[0].id - // data retrieved and stored into module scope variables - - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: 'Transfers recorded for payer', - state: enums.settlementStates.PS_TRANSFERS_RECORDED - } - ] - } - ] - } - const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified - test.ok(res, 'settlement putById operation successful') - - const settlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(settlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, 'record for payer changed to PS_TRANSFERS_RECORDED') - - netSenderSettlementTransferId = settlementParticipantCurrencyRecord.settlementTransferId - - const transferRecord = await TransferModel.getById(netSenderSettlementTransferId) - test.ok(transferRecord, 'settlement transfer is created for payer') - - const transferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) - test.equal(transferStateChangeRecord.transferStateId, enums.transferStates.RECEIVED_PREPARE, 'settlement transfer for payer is RECEIVED_PREPARE') - - const transferParticipantRecords = await Models.getTransferParticipantsByTransferId(netSenderSettlementTransferId) - const hubTransferParticipant = transferParticipantRecords.find(record => { - return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.HUB - }) - const payerTransferParticipant = transferParticipantRecords.find(record => { - return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.DFSP_POSITION - }) - test.ok(payerTransferParticipant.amount < 0, `DR settlement transfer for SETTLEMENT_NET_SENDER is negative for payer ${payerTransferParticipant.amount}`) - test.ok(hubTransferParticipant.amount > 0, `CR settlement transfer for SETTLEMENT_NET_SENDER is positive for hub ${hubTransferParticipant.amount}`) - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('PS_TRANSFERS_RECORDED for PAYEE:', async test => { - try { - const externalReferenceSample = 'tr0123456789' - const params = { - participants: [ - { - id: netSettlementRecipientId, - accounts: [ - { - id: netRecipientAccountId, - reason: 'Transfers recorded for payee', - state: enums.settlementStates.PS_TRANSFERS_RECORDED, - externalReference: externalReferenceSample - } - ] - } - ] - } - const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified - test.ok(res, 'settlement putById operation successful') - - const settlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) - test.equal(settlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, 'record for payee changed to PS_TRANSFERS_RECORDED') - test.equal(settlementParticipantCurrencyRecord.externalReference, externalReferenceSample, 'external reference is recorded') - - netRecipientSettlementTransferId = settlementParticipantCurrencyRecord.settlementTransferId - const transferRecord = await TransferModel.getById(netRecipientSettlementTransferId) - test.ok(transferRecord, 'settlement transfer is created for payee') - - const transferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) - test.equal(transferStateChangeRecord.transferStateId, enums.transferStates.RECEIVED_PREPARE, 'settlement transfer for payee is RECEIVED_PREPARE') - - const transferParticipantRecords = await Models.getTransferParticipantsByTransferId(netRecipientSettlementTransferId) - const hubTransferParticipant = transferParticipantRecords.find(record => { - return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.HUB - }) - const payeeTransferParticipant = transferParticipantRecords.find(record => { - return record.transferParticipantRoleTypeId === enums.transferParticipantRoleTypes.DFSP_POSITION - }) - test.ok(hubTransferParticipant.amount < 0, `DR settlement transfer for SETTLEMENT_NET_RECIPIENT is negative for hub ${hubTransferParticipant.amount}`) - test.ok(payeeTransferParticipant.amount > 0, `CR settlement transfer for SETTLEMENT_NET_RECIPIENT is positive for payer ${payeeTransferParticipant.amount}`) - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_RECORDED, 'settlement state is PS_TRANSFERS_RECORDED') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('PS_TRANSFERS_RESERVED for PAYER & PAYEE:', async test => { - try { - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: 'Transfers reserved for payer & payee', - state: enums.settlementStates.PS_TRANSFERS_RESERVED - } - ] - }, - { - id: netSettlementRecipientId, - accounts: [ - { - id: netRecipientAccountId, - reason: 'Transfers reserved for payer & payee', - state: enums.settlementStates.PS_TRANSFERS_RESERVED - } - ] - } - ] - } - const initialPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value - const initialPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value - - const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified - test.ok(res, 'settlement putById operation successful') - - const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, 'record for payer changed to PS_TRANSFERS_RESERVED') - - const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) - test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, 'record for payee changed to PS_TRANSFERS_RESERVED') - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_RESERVED, 'settlement state is PS_TRANSFERS_RESERVED') - - const payerTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) - test.equal(payerTransferStateChangeRecord.transferStateId, enums.transferStates.RESERVED, 'settlement transfer for payer is RESERVED') - - const payeeTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) - test.equal(payeeTransferStateChangeRecord.transferStateId, enums.transferStates.RESERVED, 'settlement transfer for payee is RESERVED') - - const currentPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value - test.equal(currentPayerPosition, initialPayerPosition, 'position for NET_SETTLEMENT_SENDER is not changed') - - const currentPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value - test.equal(currentPayeePosition, new MLNumber(initialPayeePosition).add(netSettlementAmount).toNumber(), 'position for NET_SETTLEMENT_RECIPIENT is adjusted') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('PS_TRANSFERS_COMMITTED for PAYER & PAYEE:', async test => { - try { - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: 'Transfers committed for payer & payee', - state: enums.settlementStates.PS_TRANSFERS_COMMITTED - } - ] - }, - { - id: netSettlementRecipientId, - accounts: [ - { - id: netRecipientAccountId, - reason: 'Transfers committed for payer & payee', - state: enums.settlementStates.PS_TRANSFERS_COMMITTED - } - ] - } - ] - } - const initialPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value - const initialPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value - - const res = await SettlementService.putById(settlementData.id, params, enums) // method to be verified - test.ok(res, 'settlement putById operation successful') - - const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, 'record for payer changed to PS_TRANSFERS_COMMITTED') - - const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) - test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, 'record for payee changed to PS_TRANSFERS_COMMITTED') - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.PS_TRANSFERS_COMMITTED, 'settlement state is PS_TRANSFERS_COMMITTED') - - const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, 'window is still PENDING_SETTLEMENT') - - const payerTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netSenderSettlementTransferId) - test.equal(payerTransferStateChangeRecord.transferStateId, enums.transferStates.COMMITTED, 'settlement transfer for payer is COMMITTED') - - const payeeTransferStateChangeRecord = await TransferStateChangeModel.getByTransferId(netRecipientSettlementTransferId) - test.equal(payeeTransferStateChangeRecord.transferStateId, enums.transferStates.COMMITTED, 'settlement transfer for payee is COMMITTED') - - const currentPayerPosition = (await ParticipantPositionModel.getPositionByCurrencyId(netSenderAccountId)).value - test.equal(currentPayerPosition, initialPayerPosition - netSettlementAmount, 'position for NET_SETTLEMENT_SENDER is adjusted') - - const currentPayeePosition = (await ParticipantPositionModel.getPositionByCurrencyId(netRecipientAccountId)).value - test.equal(currentPayeePosition, initialPayeePosition, 'position for NET_SETTLEMENT_RECIPIENT is unchanged') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('SETTLED for PAYER', async test => { - try { - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: 'Transfers settled for payer', - state: enums.settlementStates.SETTLED - } - ] - } - ] - } - - const res = await SettlementService.putById(settlementData.id, params, enums) - test.ok(res, 'settlement putById operation successful') - - const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(payerSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.SETTLED, 'record for payer changed to SETTLED') - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLING, 'settlement state is SETTLING') - - const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, 'window is still PENDING_SETTLEMENT') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('update SETTLED for PAYER with external reference', async test => { - try { - const externalReferenceSample = 'tr98765432109876543210' - const reasonSample = 'Additional reason for SETTLED account' - const params = { - participants: [ - { - id: netSettlementSenderId, - accounts: [ - { - id: netSenderAccountId, - reason: reasonSample, - state: enums.settlementStates.SETTLED, - externalReference: externalReferenceSample - } - ] - } - ] - } - - const res = await SettlementService.putById(settlementData.id, params, enums) - test.ok(res, 'settlement putById operation successful') - - const payerSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netSenderAccountId) - test.equal(payerSettlementParticipantCurrencyRecord.reason, reasonSample, 'Reason recorded') - test.equal(payerSettlementParticipantCurrencyRecord.externalReference, externalReferenceSample, 'External reference recorded') - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('SETTLED for PAYEE', async test => { - try { - const params = { - participants: [ - { - id: netSettlementRecipientId, - accounts: [ - { - id: netRecipientAccountId, - reason: 'Payee: SETTLED, settlement: SETTLED', - state: enums.settlementStates.SETTLED - } - ] - } - ] - } - - const res = await SettlementService.putById(settlementData.id, params, enums) - test.ok(res, 'settlement putById operation successful') - - const payeeSettlementParticipantCurrencyRecord = await SettlementParticipantCurrencyModel.getBySettlementAndAccount(settlementData.id, netRecipientAccountId) - test.equal(payeeSettlementParticipantCurrencyRecord.settlementStateId, enums.settlementStates.SETTLED, 'record for payee changed to SETTLED') - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLED, 'settlement state is SETTLED') - - const windowContentState = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(res.settlementWindows[0].content[0].id) - test.equal(windowContentState.settlementWindowStateId, 'SETTLED', 'settlement window content state is SETTLED') - - const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(settlementWindowId) - test.equal(window.settlementWindowStateId, enums.settlementWindowStates.PENDING_SETTLEMENT, 'window is PENDING_SETTLEMENT because there is more window content to settle') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('create a settlement with previous window remaining content and settle it:', async test => { - try { - const settlementStates = [enums.settlementStates.PS_TRANSFERS_RECORDED, enums.settlementStates.PS_TRANSFERS_RESERVED, enums.settlementStates.PS_TRANSFERS_COMMITTED, enums.settlementStates.SETTLED] - - let params = { - settlementModel: settlementModels[0].name, - reason: 'reason', - settlementWindows: [ - { - id: settlementWindowId - } - ] - } - settlementData = await SettlementService.settlementEventTrigger(params, enums) - test.ok(settlementData, 'settlementEventTrigger operation success') - - let res - for (const state of settlementStates) { - params = { - participants: [ - { - id: settlementData.participants[0].id, - accounts: [ - { - id: settlementData.participants[0].accounts[0].id, - reason: `Settlement to ${state} state`, - state - } - ] - }, - { - id: settlementData.participants[1].id, - accounts: [ - { - id: settlementData.participants[1].accounts[0].id, - reason: `Settlement to ${state} state`, - state - } - ] - } - ] - } - res = await SettlementService.putById(settlementData.id, params, enums) - test.ok(res, `settlement putById operation success for ${state} state`) - } - - const settlementState = await SettlementStateChangeModel.getBySettlementId(settlementData.id) - test.equal(settlementState.settlementStateId, enums.settlementStates.SETTLED, 'settlement state is SETTLED') - - const windowContentState = await Models.settlementWindowContentStateChange.getBySettlementWindowContentId(res.settlementWindows[0].content[0].id) - test.equal(windowContentState.settlementWindowStateId, 'SETTLED', 'settlement window content state is SETTLED') - - const window = await SettlementWindowStateChangeModel.getBySettlementWindowId(res.settlementWindows[0].id) - test.equal(window.settlementWindowStateId, enums.settlementWindowStates.SETTLED, 'window is SETTLED because there is no more window content to settle') - - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - await settlementTransferTest.test('finally disconnect open handles', async test => { - try { - await Db.disconnect() - await CLDb.disconnect() - test.pass('database connection closed') - await Producer.getProducer('topic-notification-event').disconnect() - test.pass('producer to topic-notification-event disconnected') - await StreamProducer.getProducer('topic-settlementwindow-close').disconnect() - test.pass('producer to topic-settlementwindow-close disconnected') - test.end() - } catch (err) { - Logger.error(`settlementTransferTest failed with error - ${err}`) - test.fail() - test.end() - } - }) - - settlementTransferTest.end() -}) From 2b0beea171e0510e458b60b3150c0aefc6825b74 Mon Sep 17 00:00:00 2001 From: vgenev Date: Tue, 2 Feb 2021 18:11:59 +0200 Subject: [PATCH 4/4] fix: vulnerability checks --- audit-resolve.json | 115 +++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 50 deletions(-) diff --git a/audit-resolve.json b/audit-resolve.json index 5355d3c0..1a4505b1 100644 --- a/audit-resolve.json +++ b/audit-resolve.json @@ -86,113 +86,113 @@ }, "1179|@mojaloop/central-ledger>@mojaloop/central-services-health>@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>node-pre-gyp>mkdirp>minimist": { "decision": "ignore", - "madeAt": 1607598687029, - "expiresAt": 1608203403058 + "madeAt": 1612274482175, + "expiresAt": 1614866450093 }, "1179|@mojaloop/central-ledger>@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>node-pre-gyp>mkdirp>minimist": { "decision": "ignore", - "madeAt": 1607598687029, - "expiresAt": 1608203403058 + "madeAt": 1612274482175, + "expiresAt": 1614866450093 }, "1179|@mojaloop/central-ledger>@mojaloop/event-sdk>grpc>node-pre-gyp>mkdirp>minimist": { "decision": "ignore", - "madeAt": 1607598687029, - "expiresAt": 1608203403058 + "madeAt": 1612274482175, + "expiresAt": 1614866450093 }, "1179|@mojaloop/central-ledger>@mojaloop/central-services-health>@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>node-pre-gyp>tar>mkdirp>minimist": { "decision": "ignore", - "madeAt": 1607598687029, - "expiresAt": 1608203403058 + "madeAt": 1612274482175, + "expiresAt": 1614866450093 }, "1179|@mojaloop/central-ledger>@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>node-pre-gyp>tar>mkdirp>minimist": { "decision": "ignore", - "madeAt": 1607598687029, - "expiresAt": 1608203403058 + "madeAt": 1612274482175, + "expiresAt": 1614866450093 }, "1179|@mojaloop/central-ledger>@mojaloop/event-sdk>grpc>node-pre-gyp>tar>mkdirp>minimist": { "decision": "ignore", - "madeAt": 1607598687029, - "expiresAt": 1608203403058 + "madeAt": 1612274482175, + "expiresAt": 1614866450093 }, "1179|@mojaloop/central-ledger>@mojaloop/central-services-health>@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>node-pre-gyp>rc>minimist": { "decision": "ignore", - "madeAt": 1607598687029, - "expiresAt": 1608203403058 + "madeAt": 1612274482175, + "expiresAt": 1614866450093 }, "1179|@mojaloop/central-ledger>@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>node-pre-gyp>rc>minimist": { "decision": "ignore", - "madeAt": 1607598687029, - "expiresAt": 1608203403058 + "madeAt": 1612274482175, + "expiresAt": 1614866450093 }, "1179|@mojaloop/central-ledger>@mojaloop/event-sdk>grpc>node-pre-gyp>rc>minimist": { "decision": "ignore", - "madeAt": 1607598687029, - "expiresAt": 1608203403058 + "madeAt": 1612274482175, + "expiresAt": 1614866450093 }, "1500|@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": { "decision": "ignore", - "madeAt": 1607598691812, - "expiresAt": 1608203403058 + "madeAt": 1612274490130, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-database>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494369, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-error-handling>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-health>@mojaloop/central-services-error-handling>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-health>@mojaloop/central-services-shared>@mojaloop/central-services-error-handling>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-shared>@mojaloop/central-services-error-handling>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-stream>@mojaloop/central-services-error-handling>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-health>@mojaloop/central-services-shared>@mojaloop/event-sdk>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-health>@mojaloop/central-services-shared>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-shared>@mojaloop/event-sdk>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/event-sdk>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>@mojaloop/central-services-shared>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1523|@mojaloop/central-ledger>lodash": { "decision": "ignore", - "madeAt": 1607598701364, - "expiresAt": 1608203403058 + "madeAt": 1612274494370, + "expiresAt": 1614866450093 }, "1589|@mojaloop/central-ledger>@mojaloop/central-object-store>@mojaloop/central-services-logger>rc>ini": { "decision": "fix", @@ -312,18 +312,33 @@ }, "1589|@mojaloop/central-ledger>@mojaloop/central-services-health>@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>node-pre-gyp>rc>ini": { "decision": "ignore", - "madeAt": 1607619606561, - "expiresAt": 1608224358700 + "madeAt": 1612274497165, + "expiresAt": 1614866450093 }, "1589|@mojaloop/central-ledger>@mojaloop/central-services-shared>@mojaloop/event-sdk>grpc>node-pre-gyp>rc>ini": { "decision": "ignore", - "madeAt": 1607619606561, - "expiresAt": 1608224358700 + "madeAt": 1612274497165, + "expiresAt": 1614866450093 }, "1589|@mojaloop/central-ledger>@mojaloop/event-sdk>grpc>node-pre-gyp>rc>ini": { "decision": "ignore", - "madeAt": 1607619606561, - "expiresAt": 1608224358700 + "madeAt": 1612274497165, + "expiresAt": 1614866450093 + }, + "1500|@mojaloop/central-services-health>@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": { + "decision": "ignore", + "madeAt": 1612274490130, + "expiresAt": 1614866450093 + }, + "1594|@mojaloop/central-ledger>@mojaloop/central-services-health>@mojaloop/central-services-shared>axios": { + "decision": "ignore", + "madeAt": 1612274499239, + "expiresAt": 1614866450093 + }, + "1594|@mojaloop/central-ledger>@mojaloop/central-services-shared>axios": { + "decision": "ignore", + "madeAt": 1612274499239, + "expiresAt": 1614866450093 } }, "rules": {},