# entourage-cli
Client for entourage
See repository page chriskalmar/entourage for more information.
# Install
Using npm:
npm install entourage-cli
or using yarn:
yarn add entourage-cli
# Example use with a CI pipeline
# initialize profile with the name 'demo'
# using the project's '.entourage.js' file as config
entourage-cli init demo
# using custom '.entourage.js' file as config
entourage-cli init demo --file test/.entourage.js
# meanwhile perform regular CI tasks
# like linting, building and so on
# check if profile is ready for up to 180 seconds before failing
entourage-cli wait demo 180
# collect generated ports and export them as environment variables
# e.g.
# PORT_httpbin_80=37820
# PORT_hello_80=47762
$(entourage-cli env demo)
# use new environment variable to configure your project
# and run integration tests
# clean up entourage server to free up resources
entourage-cli destroy demo
# continue with further CI tasks
# Modules
# Command
- Command
- ~readConfig(configPath) ⇒
objet
- ~checkConfig(config) ⇒
boolean
- ~init(argv)
- ~wait(argv)
- ~destroy(argv)
- ~env(argv)
- ~readConfig(configPath) ⇒
# Command~readConfig(configPath) ⇒ objet
Read config file (JS | JSON)
Kind: inner method of Command
Returns: objet
- config
Throws:
- Config file X not found
Param | Type |
---|---|
configPath | string |
# Command~checkConfig(config) ⇒ boolean
Check config content
Validate url, profile and timeout presence
Kind: inner method of Command
Throws:
- Invalid config
Param | Type |
---|---|
config | object |
# Command~init(argv)
Init command
Trigger initProfile mutation on entourage-server
Kind: inner method of Command
Param | Type |
---|---|
argv | object |
# Command~wait(argv)
Wait command
Trigger profileCreated subscription on entourage-server
Kind: inner method of Command
Param | Type |
---|---|
argv | object |
# Command~destroy(argv)
Destroy command
Trigger destroyProfile mutation on entourage-server
Kind: inner method of Command
Param | Type |
---|---|
argv | object |
# Command~env(argv)
Env command
Trigger getProfileStats query on entourage-server
Kind: inner method of Command
Param | Type |
---|---|
argv | object |
# Request
# Request~request(req) ⇒ object
Create a request
Kind: inner method of Request
Returns: object
- response
Param | Type |
---|---|
req | object |
Properties
Name | Type |
---|---|
req.config | object |
req.query | string |
req.variables | object |
# Subscribe
- Subscribe
- ~eventBus :
EventEmitter
- ~subscribe(sub) ⇒
MQTTClient
- ~EventEmitter
- ~MQTTClient
- ~eventBus :
# Subscribe~eventBus : EventEmitter
Kind: inner constant of Subscribe
# Subscribe~subscribe(sub) ⇒ MQTTClient
Create a subscription
Send an event back onMessage
Kind: inner method of Subscribe
Emits: event:eventName
Param | Type |
---|---|
sub | object |
Properties
Name | Type |
---|---|
sub.config | object |
sub.eventName | string |
# Subscribe~EventEmitter
Kind: inner typedef of Subscribe
# Subscribe~MQTTClient
Kind: inner typedef of Subscribe
← Server