amqp-delegate
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -49,3 +49,3 @@ # How to contribute to this project | ||
It's basically the same process but use the word `hotfix` or `support` instead of `feature`. `git flow` knows what to do. Just keep in mind that any changes are going to happen to your fork, and not the upstream repo. If you need to merge a `hotfix` into upstream master you may only do it va a reviewed pull request. | ||
It's basically the same process but use the word `hotfix` or `support` instead of `feature`. `git flow` knows what to do. Just keep in mind that any changes are going to happen to your fork, and not the upstream repo. If you need to merge a `hotfix` into upstream master you may only do it va a reviewed pull request. | ||
@@ -60,3 +60,3 @@ ### Releasing to production | ||
Note you will **never** push changes directly to the upstream project, *only to your own fork*. | ||
Note you will **never** push changes directly to the upstream project, _only to your own fork_. | ||
@@ -77,3 +77,3 @@ **Changes may only be introduced into the upstream project via a properly reviewed pull request.** | ||
When commiting something use the `-m` flag to add a short commit message of the format `{issue number} summary of what you changed`. So for example if you are working on issue `ABC-1` and you added a method to the `aardvark_controller` you might use the following commit message `"ABC-1 added anteater method to aardvark controller"` | ||
When commiting something use the `-m` flag to add a short commit message of the format `{issue number} summary of what you changed`. So for example if you are working on issue `ABC-1` and you added a method to the `aardvark_controller` you might use the following commit message `"ABC-1 added anteater method to aardvark controller"` | ||
@@ -86,8 +86,8 @@ Commit messages ought to be in the past tense. | ||
Pull requests must be named as follows `[issue type, issue number] high level description of change`. The following Issue Types are recognised | ||
Pull requests must be named as follows `[issue type, issue number] high level description of change`. The following Issue Types are recognised | ||
* `Bug Fix` - the change fixes a bug | ||
* `Feature` - the change adds a new feature (the usual issue type) | ||
* `Documentation` — The change is a documentation only change | ||
* `Optimisation` - The change is an optimisation of the code base without any functional changes | ||
- `Bug Fix` - the change fixes a bug | ||
- `Feature` - the change adds a new feature (the usual issue type) | ||
- `Documentation` — The change is a documentation only change | ||
- `Optimisation` - The change is an optimisation of the code base without any functional changes | ||
@@ -100,4 +100,4 @@ If your change does not fit any of these categories, use `Feature`. Likewise if your change is not tied to an issue number you may use `n/a` instead. | ||
A developer must be responsible for their own work, from accepting a task through to merging to production. With that in mind if you review another developer's PR, please don't then merge it yourself. As a general rule you must let the developer merge her own PRs. | ||
A developer must be responsible for their own work, from accepting a task through to merging to production. With that in mind if you review another developer's PR, please don't then merge it yourself. As a general rule you must let the developer merge her own PRs. | ||
Likewise, don't expect someone else to merge your PR. Unless you do not have write permission on a project, you will always aim to take personal responsibility for the quality of the code that gets merged in. | ||
Likewise, don't expect someone else to merge your PR. Unless you do not have write permission on a project, you will always aim to take personal responsibility for the quality of the code that gets merged in. |
{ | ||
"name": "amqp-delegate", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A very simplistic, but performant, remote worker system that uses AMQP to coordinate jobs.", | ||
"main": "src/index.js", | ||
"engines": { | ||
"node": ">= 10.15.1" | ||
"node": ">= 10.15.3" | ||
}, | ||
@@ -17,3 +17,3 @@ "files": [ | ||
"lint": "eslint .", | ||
"prettier": "prettier --single-quote --no-semi --write '**/*.{js,json}'", | ||
"prettier": "prettier --write '**/*.{js,json,md}'", | ||
"start": "node index.js", | ||
@@ -27,3 +27,6 @@ "backend": "docker-compose up -d amqp", | ||
"keywords": [ | ||
"amqp" | ||
"amqp", | ||
"delegate", | ||
"remote-worker", | ||
"remote-jobs" | ||
], | ||
@@ -42,26 +45,31 @@ "author": "Dave Sag <davesag@gmail.com>", | ||
"devDependencies": { | ||
"ajv": "^6.7.0", | ||
"ajv": "^6.10.0", | ||
"chai": "^4.2.0", | ||
"chai-as-promised": "^7.1.1", | ||
"eslint": "^5.12.1", | ||
"eslint-config-prettier": "^4.0.0", | ||
"eslint": "^5.16.0", | ||
"eslint-config-prettier": "^4.1.0", | ||
"eslint-config-standard": "^12.0.0", | ||
"eslint-plugin-import": "^2.15.0", | ||
"eslint-plugin-mocha": "^5.2.1", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-mocha": "^5.3.0", | ||
"eslint-plugin-node": "^8.0.1", | ||
"eslint-plugin-prettier": "^3.0.1", | ||
"eslint-plugin-promise": "^4.0.1", | ||
"eslint-plugin-promise": "^4.1.1", | ||
"eslint-plugin-standard": "^4.0.0", | ||
"faker": "^4.1.0", | ||
"husky": "^1.3.1", | ||
"lint-staged": "^8.1.1", | ||
"mocha": "^5.2.0", | ||
"nyc": "^13.1.0", | ||
"prettier": "^1.16.1", | ||
"lint-staged": "^8.1.5", | ||
"mocha": "^6.1.1", | ||
"nyc": "^13.3.0", | ||
"prettier": "^1.16.4", | ||
"proxyquire": "^2.1.0", | ||
"sinon": "^7.2.3", | ||
"sinon": "^7.3.1", | ||
"sinon-chai": "^3.3.0", | ||
"supertest": "^3.4.2", | ||
"supertest": "^4.0.2", | ||
"wait-until": "0.0.2" | ||
}, | ||
"prettier": { | ||
"semi": false, | ||
"singleQuote": true, | ||
"proseWrap": "never" | ||
}, | ||
"husky": { | ||
@@ -73,4 +81,4 @@ "hooks": { | ||
"lint-staged": { | ||
"**/*.{js,json}": [ | ||
"prettier --single-quote --no-semi --write", | ||
"**/*.{js,json,md}": [ | ||
"prettier --write", | ||
"git add" | ||
@@ -77,0 +85,0 @@ ] |
# amqp-delegate | ||
A very simplistic, but performant, remote worker system that uses AMQP to coordinate jobs. | ||
A very simple, performant, remote worker system that uses `AMQP` to coordinate jobs. | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/davesag/amqp-delegate.svg)](https://greenkeeper.io/) | ||
<!-- prettier-ignore --> | ||
| branch | status | coverage | notes | | ||
@@ -16,3 +17,3 @@ | ------ | ------ | -------- | ----- | | ||
* [`amqp-simple-pub-sub`](https://github.com/davesag/amqp-simple-pub-sub) — A library that simplifies use of aqmp based publishers and subscribers. | ||
- [`amqp-simple-pub-sub`](https://github.com/davesag/amqp-simple-pub-sub) — A library that simplifies use of aqmp based publishers and subscribers. | ||
@@ -31,5 +32,5 @@ ## Usage | ||
const worker = makeWorker({ | ||
url: <the url of the amqp server> - defaults to ampq://localhost, | ||
name: <the name of the worker> — required, | ||
task: <any pure async function> — required | ||
url: 'ampq://localhost:5672', // the default | ||
name: 'the name of the worker', // required | ||
task: async () => 'any pure async function', // required | ||
onError: err => { // optional | ||
@@ -60,8 +61,8 @@ console.error('A connection error happened', err) // or do something clever | ||
const delegator = makeWorker({ | ||
url: <the url of the amqp server> - defaults to ampq://localhost, | ||
url: 'ampq://localhost:5672', // the default | ||
onError: err => { // optional | ||
console.error('A connection error happened', err) // or do something clever | ||
console.error('A connection error happened', err) // or something clever | ||
} | ||
onClose: () => { // optional | ||
console.log('The connection has closed.') // or do something clever | ||
console.log('The connection has closed.') // or something clever | ||
} | ||
@@ -134,4 +135,4 @@ }) | ||
* [NodeJS](htps://nodejs.org), version 10.15.0 or better (I use [`nvm`](https://github.com/creationix/nvm) to manage Node versions — `brew install nvm`.) | ||
* [Docker](https://www.docker.com) (Use [Docker for Mac](https://docs.docker.com/docker-for-mac/), not the homebrew version) | ||
- [NodeJS](htps://nodejs.org), version 10.15.3 or better (I use [`nvm`](https://github.com/creationix/nvm) to manage Node versions — `brew install nvm`.) | ||
- [Docker](https://www.docker.com) (Use [Docker for Mac](https://docs.docker.com/docker-for-mac/), not the homebrew version) | ||
@@ -154,5 +155,5 @@ ### Initialisation | ||
* `npm test` — runs the unit tests (does not need rabbitmq) | ||
* `npm run test:unit:cov` — runs the unit tests with code coverage (does not need rabbitmq) | ||
* `npm run test:integration` — runs the integration tests (needs rabbitmq) | ||
- `npm test` — runs the unit tests (does not need rabbitmq) | ||
- `npm run test:unit:cov` — runs the unit tests with code coverage (does not need rabbitmq) | ||
- `npm run test:integration` — runs the integration tests (needs rabbitmq) | ||
@@ -159,0 +160,0 @@ ### Lint it |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
218114
5874
164
0