{"_id":"@axerunners/ap-services-ctl","_rev":"3-a0ea0e971d55a4b7c32e7f3488a4fd81","name":"@axerunners/ap-services-ctl","dist-tags":{"latest":"0.7.3"},"versions":{"0.7.1":{"name":"@axerunners/ap-services-ctl","version":"0.7.1","description":"Control AXE Platform services using JavaScript and Docker","engines":{"node":">=8"},"scripts":{"lint":"eslint .","test":"mocha './test/**/*.spec.js'","test:unit":"mocha './test/unit/**/*.spec.js'","test:integration":"mocha './test/integration/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/axerunners/js-ap-services-ctl.git"},"devDependencies":{"chai":"^4.2.0","chai-as-promised":"^7.1.1","dirty-chai":"^2.0.1","dotenv":"^6.2.0","dotenv-expand":"^4.2.0","eslint":"^5.11.0","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.14.0","mocha":"^5.2.0","mocha-sinon":"^2.1.0","sinon":"^7.2.2","sinon-chai":"^3.3.0","multihashes":"^0.4.14","cids":"^0.6.0"},"dependencies":{"@axerunners/dapi-client":"^0.4.3","@axerunners/axed-rpc":"^1.2.1","aws-sdk":"^2.382.0","axios":"^0.18.0","cbor":"^4.1.4","dockerode":"^2.5.7","grpc":"^1.20.0","grpc-health-check":"^1.6.6","ipfs-http-client":"^29.0.1","jayson":"^2.1.0","loaxe":"^4.17.11","mongodb":"^3.1.10"},"license":"MIT","bugs":{"url":"https://github.com/axerunners/js-ap-services-ctl/issues"},"homepage":"https://github.com/axerunners/js-ap-services-ctl#readme","gitHead":"4504e3009f9d636a59027f7168cb4068cb957e46","_id":"@axerunners/ap-services-ctl@0.7.1","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-TpP7XrYJhepA3/lrlaAF854NtDAbeUf6bQHsD0VEJHsC7PwO3TMEqFFx9dnPoT4sXYte5aIGyx2cXVZCxcMArw==","shasum":"b1fb8a931787eac586f14d716605def9525d7c04","tarball":"https://registry.npmjs.org/@axerunners/ap-services-ctl/-/ap-services-ctl-0.7.1.tgz","fileCount":95,"unpackedSize":176722,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7bQeCRA9TVsSAnZWagAAymEP+QHdSQawJt9lH/7SUuit\n5dg7XdD+XSPKaj9BFfrtryOrUNX7GK3ekocGXUXnFKpdklPfqBQxzdIT+oD/\nOOP2cQ/y+DQWHimwXFstVVmJdKDQb1PWx0w1qEogkIZdY2kuhdS4Ny03OjVR\n6hW4o4sRYTQiT5LHXb3il3DBx9kSQcNvzmzZyu6K8YSEXvHXZuW2JC1eu+wO\n4NFFNMg1NTu97mtmcN4z/nTKC2Ih9UJyNndxK/WRTc3cT8ETjEnlaM5ukYrI\nddcc50L+ljo2RZHRH5TFLhlUa4yIR0sOFHM+u72IOsokG94XDVzj3jvEKfgg\nbaOHIeJUmU3f4PAlznbNqqsrYGHuG43TEXBeJ2NOjl36xkqHVZooy5lEcItf\nmIw8aFRT6XmE/IbrEqL4RvkCYbkkL4d0e/fVz8Dz9dZlIiwwKLB/M4Qnkx/j\nBMONZQpo0lwYPyxL9u/Un9gXnx0iIUouxySOxXjoZU3uoKOj5O3fhr/saleh\nfDSv9S0DBBH9unpCZmCS54zmxxQWwtYu99XbJwP14VuFFTL4klPoBUCcNMSn\nik5VOZz5UqJs1N0FoZ6sVkjBeKOsGXznmZxqEqhpO79cZQ6RbtSwJ6KJUSBx\nqBn2AXx86mYLmxa9AJh4MqRpnB46Fi6BEp8khcH+PPrXhT9lKpRWfTEmsNQ5\nh0uq\r\n=k9gy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHOmQ5gd8L3AcvqOaqFBhlKlyuzJntdrVuQ5Sk5H2QMgIgHL2Fb2/sUDKuIc59A5m5DRxw3mwGFxrgVVFb7A1DpvY="}]},"maintainers":[{"name":"charlie137","email":"charlie@axerunners.com"},{"name":"ddude1","email":"bence.coronation@gmail.com"}],"_npmUser":{"name":"charlie137","email":"charlie@axerunners.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ap-services-ctl_0.7.1_1559082013933_0.00024603337621997845"},"_hasShrinkwrap":false},"0.7.2":{"name":"@axerunners/ap-services-ctl","version":"0.7.2","description":"Control AXE Platform services using JavaScript and Docker","engines":{"node":">=8"},"scripts":{"lint":"eslint .","test":"mocha './test/**/*.spec.js'","test:unit":"mocha './test/unit/**/*.spec.js'","test:integration":"mocha './test/integration/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/axerunners/js-ap-services-ctl.git"},"devDependencies":{"chai":"^4.2.0","chai-as-promised":"^7.1.1","dirty-chai":"^2.0.1","dotenv":"^6.2.0","dotenv-expand":"^4.2.0","eslint":"^5.11.0","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.14.0","mocha":"^5.2.0","mocha-sinon":"^2.1.0","sinon":"^7.2.2","sinon-chai":"^3.3.0","multihashes":"^0.4.14","cids":"^0.6.0"},"dependencies":{"@axerunners/dapi-client":"^0.4.3","@axerunners/axed-rpc":"^1.2.1","aws-sdk":"^2.382.0","axios":"^0.18.0","cbor":"^4.1.4","dockerode":"^2.5.7","grpc":"^1.20.0","grpc-health-check":"^1.6.6","ipfs-http-client":"^29.0.1","jayson":"^2.1.0","lodash":"^4.17.11","mongodb":"^3.1.10"},"license":"MIT","bugs":{"url":"https://github.com/axerunners/js-ap-services-ctl/issues"},"homepage":"https://github.com/axerunners/js-ap-services-ctl#readme","gitHead":"73b2a5ca9f9884e31d22c392e1a6a60153406a3e","_id":"@axerunners/ap-services-ctl@0.7.2","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-xb7/bS+vAVAmJtE99YBys9J5+Vcn93d2rCy2xn7HcbnLJtj+M0TYQ5aCmri0MmlMoCsOWeZ8tNF3j0YCLWcuQg==","shasum":"f9f448c1802c044201b029d4940da2a00d77ec90","tarball":"https://registry.npmjs.org/@axerunners/ap-services-ctl/-/ap-services-ctl-0.7.2.tgz","fileCount":95,"unpackedSize":176725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7coBCRA9TVsSAnZWagAACd8P/2fDO8Qn1r7mPNbHrj16\ncyzBzfoBnuGrWVoZZl4wFBDNeKORePMONVyRbUIXc/Rsi77BudfrU1lfP6mi\nQ2zMktR+lQTAwUJ8XAa36g+0M8zKVvmFnSdpAeLK/bQYaKq/I05ddjB+8g3f\nM5X1Hnp/DieFkBSy1fvlritL32FyuN8LnZEUoWa5C7P926MqdcmBHI2lnrL7\nCZ69Vcoz7vysTmeg/wmguSl+B4mwYsL+C8cbxQoqOoi8bOEJB/yS7ttfDJ1g\nXyPSScFutcrWLg4zkEMINwcGuNsTghXtVrVV8r0+0HqH9FEVrNmrPBXKH5lX\nEHtnyNpRdtnxJNMJ1QDnYq27pc9g5egs28QU+yXxvVQijD80OAVkgHGSyTNs\nweCWzB5nXm8cOXCTDKljZV3OX1Slt19Ao7xgRXFxdDfvy6/FbOPF+3E5mfNI\nlGWUBg/6CMKLWcJ/BuDtUqn9fmp67GOH5CTVCUQlggituYEe/wQPyjlT1Nlx\ncUSpw1TMIpaUFaWVPvDSw99pGvEAjPk3ExrjfLgAXrB76NMAscZ40kFfz+Or\n42SJKDuhQQ3a2E2V5lJQk+qPNF0075cQs88CSfJq90hIdLpHz/t0MkjA1FJO\nR5/LKFbi7hhDHFdi3DB6zWKK3wODiIDyNSdbdac9Y72sIqpL2OD3Hj8rDhRI\nDBd1\r\n=+zHP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDDlFXcCLVPy8K/06t2BJmGJPOhrc2ZXXgdyg+ZN/MzwIhAINwWPvDrJaUg9YCcV4FY3KaSX0dHr2K7j8PQlkKLxvJ"}]},"maintainers":[{"name":"charlie137","email":"charlie@axerunners.com"},{"name":"ddude1","email":"bence.coronation@gmail.com"}],"_npmUser":{"name":"charlie137","email":"charlie@axerunners.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ap-services-ctl_0.7.2_1559087616317_0.49056587372768523"},"_hasShrinkwrap":false},"0.7.3":{"name":"@axerunners/ap-services-ctl","version":"0.7.3","description":"Control AXE Platform services using JavaScript and Docker","engines":{"node":">=8"},"scripts":{"lint":"eslint .","test":"mocha './test/**/*.spec.js'","test:unit":"mocha './test/unit/**/*.spec.js'","test:integration":"mocha './test/integration/**/*.spec.js'"},"repository":{"type":"git","url":"git+https://github.com/axerunners/js-ap-services-ctl.git"},"devDependencies":{"chai":"^4.2.0","chai-as-promised":"^7.1.1","dirty-chai":"^2.0.1","dotenv":"^6.2.0","dotenv-expand":"^4.2.0","eslint":"^5.11.0","eslint-config-airbnb-base":"^13.1.0","eslint-plugin-import":"^2.14.0","mocha":"^5.2.0","mocha-sinon":"^2.1.0","sinon":"^7.2.2","sinon-chai":"^3.3.0","multihashes":"^0.4.14","cids":"^0.6.0"},"dependencies":{"@axerunners/dapi-client":"^git+https://github.com/AXErunners/dapi-client","@axerunners/axed-rpc":"^1.2.1","aws-sdk":"^2.382.0","axios":"^0.18.0","cbor":"^4.1.4","dockerode":"^2.5.7","grpc":"^1.20.0","grpc-health-check":"^1.6.6","ipfs-http-client":"^29.0.1","jayson":"^2.1.0","lodash":"^4.17.11","mongodb":"^3.1.10"},"license":"MIT","bugs":{"url":"https://github.com/axerunners/js-ap-services-ctl/issues"},"homepage":"https://github.com/axerunners/js-ap-services-ctl#readme","gitHead":"f061c7fb65e274589b0365f6f3c9be959aa0637f","_id":"@axerunners/ap-services-ctl@0.7.3","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-saxq8elV2AZEzIxAzy9n8Xihd/RcS55jQVuvSKgFjk0qincuFd+pK8tZg+Mq4QPAkSAJ999xhBv7A8ZGM1BYTw==","shasum":"909be0c329df7adaf391eb601ceab59a4972fd06","tarball":"https://registry.npmjs.org/@axerunners/ap-services-ctl/-/ap-services-ctl-0.7.3.tgz","fileCount":95,"unpackedSize":176765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7cxfCRA9TVsSAnZWagAAYNYP/2CIDXyIMXKiXCeYll8F\n2QlBs5jQgJno/4cdpQ4JDslS+87XIBVnLlpHl41Y+LmE+hn3CYlSvgfvVBWT\nNXsrdosQJ2u8kDtc47AB581/rITUVQiki6+srpPTMJgJ/FB1crGPur2XKAKQ\n1Rt8jRQuNCUDSvdFFtkzmUChNpJCQw0WQjBZzd2csElAzkLOJisoFgy5K0hR\nzEWdapJXPu48HOoFRPwkcxXi8UbceKx75wPxlYavBLU0UkfyUWFp4tKYW7rk\nKyevMosyo3UwfobGLggYlB/NxHayfw7WRsn/GxXe67FyiJtgkbcsaxODcp63\nlvtI8RcPEWEWWn+GmGApj3Myi+pi+0Ze18JeEPe82mAxsaKArKpDwsRxhF/K\nVtEWsBUdapBtDGy3H6jIyTeljVLkqJ/TGzJAt3VuwnTG1ztyRP5hmK1Po4lO\nRyNDswEuXCH/McPHZBADk3bqT9y4itdeL4Vbypcs761yWmGV3jcM5xWNnJxl\nDYun05Dj48l8E1lSBft/GxfK36OMQbkkxXPeHGzOIcYKcyJsYUVWcreKeeyb\nw1EcbynyaF80zNAR6cq+f38mQWlYIpXOP7vy9OJI/x32zsiL8DGyPy63hxR2\nXBuxNYT12GLTnb+jrADAtJ3Eb4TIFSWJNpWPrpI9p2kqpAUHS43XnKAPgmKE\nFqur\r\n=EUf/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFgtvMUq07sUF7ujqaiX4c5n8VHKNmOMAoDnvzrrv9USAiAg7qjlJMOiB6rlji/TOJwydzZCFkiGu6z7GjeTlNQPxg=="}]},"maintainers":[{"name":"charlie137","email":"charlie@axerunners.com"},{"name":"ddude1","email":"bence.coronation@gmail.com"}],"_npmUser":{"name":"charlie137","email":"charlie@axerunners.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ap-services-ctl_0.7.3_1559088223150_0.06315902003118379"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-28T22:20:13.881Z","0.7.1":"2019-05-28T22:20:14.095Z","modified":"2022-04-04T17:09:32.702Z","0.7.2":"2019-05-28T23:53:36.487Z","0.7.3":"2019-05-29T00:03:43.313Z"},"maintainers":[{"name":"charlie137","email":"charlie@axerunners.com"},{"name":"ddude1","email":"bence.coronation@gmail.com"}],"description":"Control AXE Platform services using JavaScript and Docker","homepage":"https://github.com/axerunners/js-ap-services-ctl#readme","repository":{"type":"git","url":"git+https://github.com/axerunners/js-ap-services-ctl.git"},"bugs":{"url":"https://github.com/axerunners/js-ap-services-ctl/issues"},"license":"MIT","readme":"# Axe Platform services ctl\n\n[![Build Status](https://travis-ci.com/axerunners/js-ap-services-ctl.svg?branch=master)](https://travis-ci.com/axerunners/js-ap-services-ctl)\n[![NPM version](https://img.shields.io/npm/v/@axerunners/ap-services-ctl.svg)](https://npmjs.org/package/@axerunners/ap-services-ctl)\n\n> Control Axe Platform services using JavaScript and Docker\n\nThe tool provides a convenient JavaScript interface for configuration and interaction with Axe Platform services. Services are started in Docker containers.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n    - [Available AP services](#available-ap-services)\n    - [Services configuration](#services-configuration)\n    - [Integration with Mocha](#integration-with-mocha)\n- [Maintainers](#maintainers)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n1. [Install Docker](https://docs.docker.com/install/)\n2. Install NPM package:\n\n    ```sh\n    npm install @axerunners/ap-services-ctl\n    ```\n\n## Usage\n\n### Available AP services\n\n#### Drive\n\n[Drive](https://github.com/axerunners/drive) service starts a bunch of related services:\n- Drive Api\n    - [Methods](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/driveApi/DriveApi.js)\n    - [Options](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/driveApi/DriveApiOptions.js)\n- Drive Sync\n    - [Methods](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/driveSync/DriveSync.js)\n    - [Options](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/driveSync/DriveSyncOptions.js)\n- [IPFS](#ipfs)\n- [MongoDB](#mongodb)\n- [Axe Core](#axe-core)\n\n#### DAPI\n\n[DAPI](https://github.com/axerunners/dapi) service starts all AP services:\n- DAPI Core\n    - [Methods](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/dapi/core/DapiCore.js)\n    - [Options](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/dapi/core/DapiCoreOptions.js)\n- DAPI TxFilterStream\n    - [Methods](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/dapi/txFilterStream/DapiTxFilterStream.js)\n    - [Options](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/dapi/txFilterStream/DapiTxFilterStreamOptions.js)\n- [Drive Api](#drive)\n- [Drive Sync](#drive)\n- [IPFS](#ipfs)\n- [MongoDB](#mongodb)\n- [AxeCore](#axe-core)\n- [Insight](#insight)\n\n#### Axe Core\n\n[Axe Core](https://github.com/axerunners/axe) service\n    - [Methods](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/axeCore/AxeCore.js)\n    - [Options](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/axeCore/AxeCoreOptions.js)\n\n#### Insight API\n\n- [Insight API](https://github.com/axerunners/insight-api) service\n    - [Methods](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/insightApi/InsightApi.js)\n    - [Options](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/insightApi/InsightApiOptions.js)\n\n#### IPFS\n\n- [IPFS](https://github.com/ipfs/go-ipfs) service\n    - [Methods](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/IPFS/IPFS.js)\n    - [Options](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/IPFS/IPFSOptions.js)\n\n#### MongoDB\n\n- [MongoDB](https://www.mongodb.com/) service\n    - [Methods](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/mongoDb/MongoDb.js)\n    - [Options](https://github.com/axerunners/js-ap-services-ctl/blob/master/lib/services/mongoDb/MongoDbOptions.js)\n\n### Starting a service\n\n```js\n// Export service(s)\nconst { startIPFS } = require('@axerunners/ap-services-ctl');\n\n// This is optional. Default options listed in options class\nconst options = {\n  port: 5001, // IPFS port\n};\n\n// Start service\nconst ipfs = await startIPFS(options);\n\n// Get peer ID\nconst peerId = await ipfs.getApi().id();\n\n// Stop IPFS\nawait ipfs.remove();\n```\n\nUse `many` method to start several instances:\n\n```js\nconst { startIPFS } = require('@axerunners/ap-services-ctl');\n\n// This is optional. Default options listed in options class\nconst options = {\n  port: 5001, // IPFS port\n};\n\n// Start two services\nconst ipfsNodes = await startIPFS.many(2, options);\n\n// Get peer IDs\nconst [peerId1, peerId2] = await Promise.all(\n  ipfsNodes.map(ipfs => ipfs.getApi().id()),\n);\n\n// Stop IPFS nodes\nawait Promise.all(\n  ipfsNodes.map(ipfs => ipfs.remove()),\n);\n```\n\n### Services configuration\n\nEach service has default options which can be overwritten in three ways:\n1. Pass options as plain JS object to `start[service]` or `create[service]` methods\n2. Pass instance of options class to `start[service]` or `create[service]` methods\n3. Pass default options as plain JS object to `setDefaultCustomOptions` method of options class\n\n### Integration with Mocha\n\nServices [Mocha](https://mochajs.org/) hooks provide automation for your mocha tests:\n- Removing obsolete related Docker containers (`before`)\n- Cleaning a service state between tests (`beforeEach`, `afterEach`)\n- Stopping service after tests (`after`)\n\n```js\n// Export service(s) with mocha hooks\nconst { mocha: { startIPFS } } = require('@axerunners/ap-services-ctl');\n\ndescribe('Test suite', () => {\n  let ipfsApi;\n\n  startIPFS().then(ipfs => () => {\n    ipfsApi = ipfs.getApi();\n  });\n\n  it('should do something', async () => {\n    const peerId = await ipfsApi.id();\n\n    expect(peerId).to.be.a('string');\n  });\n});\n```\n\n## Maintainers\n\n[@shumkov](https://github.com/shumkov)\n\n[@jawid-h](https://github.com/jawid-h)\n\n[@abvgedeika](https://github.com/abvgedeika)\n\n## Contributing\n\nFeel free to dive in! [Open an issue](https://github.com/axerunners/js-ap-services-ctl/issues/new) or submit PRs.\n\n## License\n\n[MIT](LICENSE) &copy; Axe Core Group, Inc.\n","readmeFilename":"README.md"}