Gathering detailed insights and metrics for @dashevo/dp-services-ctl
Gathering detailed insights and metrics for @dashevo/dp-services-ctl
Gathering detailed insights and metrics for @dashevo/dp-services-ctl
Gathering detailed insights and metrics for @dashevo/dp-services-ctl
npm install @dashevo/dp-services-ctl
Dash Platform Service Controller v0.15.1
Published on 13 Jul 2023
Dash Platform Service Controller v0.15.0
Published on 21 Sept 2022
Dash Platform Service Controller v0.19.0-dev.1
Published on 23 Mar 2021
Dash Platform Service Controller v0.14.0
Published on 23 Jul 2020
Dash Platform Service Controller v0.14.0-dev.1
Published on 09 Jun 2020
Dash Platform Service Controller v0.13.1
Published on 09 Jun 2020
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
5 Stars
148 Commits
6 Forks
14 Watching
7 Branches
15 Contributors
Updated on 19 Oct 2022
JavaScript (99.23%)
Shell (0.77%)
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-55.6%
4
Compared to previous week
Last month
4.7%
177
Compared to previous month
Last year
-47%
1,154
Compared to previous year
Control Dash Platform services using JavaScript and Docker
The tool provides a convenient JavaScript interface for configuration and interaction with Dash Platform services. Services are started in Docker containers.
Install NPM package:
1npm install @dashevo/dp-services-ctl
Drive service starts a bunch of related services:
DAPI service starts all DP services:
1// Export service(s) 2const { startMongoDb } = require('@dashevo/dp-services-ctl'); 3// This is optional. Default options listed in options class 4const options = { 5 port: 27017, // mongoDB port 6}; 7 8// Start service 9const mongo = await startMongoDb(options); 10 11// Get mongo client 12const client = await mongo.getClient(); 13 14// Stop mongoDB 15await mongo.remove();
Use many
method to start several instances:
1const { startMongoDb } = require('@dashevo/dp-services-ctl'); 2 3// This is optional. Default options listed in options class 4const options = { 5 port: 27017, // mongoDB port 6}; 7 8// Start two services 9const mongoNodes = await startMongoDb.many(2,options); 10 11// Get peer IDs 12const [client1, client2] = await Promise.all( 13 mongoNodes.map(mongo => mongo.getClient()), 14); 15 16// Stop mongoDB nodes 17await Promise.all( 18 mongoNodes.map(mongo => mongo.remove()), 19);
Each service has default options which can be overwritten in three ways:
start[service]
or create[service]
methodsstart[service]
or create[service]
methodssetDefaultCustomOptions
method of options classServices Mocha hooks provide automation for your mocha tests:
before
)beforeEach
, afterEach
)after
)1// Export service(s) with mocha hooks 2const { mocha: { startMongoDb } } = require('@dashevo/dp-services-ctl'); 3 4describe('Test suite', () => { 5 let mongoClient; 6 7 startMongoDb().then(mongo => () => { 8 mongoClient = mongo.getClient(); 9 }); 10 11 it('should do something', async () => { 12 const collection = mongoClient.db('test').collection('syncState'); 13 const count = await collection.countDocuments({}); 14 15 expect(count).to.equal(0); 16 }); 17});
Feel free to dive in! Open an issue or submit PRs.
MIT © Dash Core Group, Inc.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 15/26 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
45 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More