93 Commits

Author SHA1 Message Date
Jesse Gibson
77d9d86fe3 1.0.0 v1.0.0 2016-10-06 11:09:15 -06:00
Jesse Gibson
07250450a7 Fix readme
I forgot to uncomment the image and badge links! They slow down my
markdown previewer... [CI skip]
2016-10-06 11:08:31 -06:00
Jesse Gibson
0d85906381 Update changelog
Preparing to release v1.0! [CI skip]
2016-10-06 11:07:08 -06:00
Jesse Gibson
bd8e1ce58e Update readme
Revise the docs to include the Client API, and change up some of the
confusing/bloated parts of the readme (like that monologue on promises).
2016-10-06 11:05:19 -06:00
Jesse Gibson
477f178ae9 Update deps and changelog
Breaking changes in panic client v1.0! Yeah, that's right, v1.0!
2016-10-05 22:56:04 -06:00
Jesse Gibson
05ac616168 Upgrade for new panic-client reports
Instead of reporting just an error, jobs now respond with an object.
That object contains the return value from the job, or it's error. It
also allows more features to be added in the future, potentially by 3rd
party plugins.
2016-10-05 20:53:32 -06:00
Jesse Gibson
94255870ca Add Client validation, expose API
The Client constructor now makes sure that the handshake object it's
given is valid. Also, the constructor is now exposed to the world
through the `panic.Client` property.
2016-10-05 09:13:06 -06:00
Jesse Gibson
eb4d0adc00 Update docs and changelog
Removed "create client interface" from the readme roadmap, and added it
to the changelog.
2016-10-05 08:55:55 -06:00
Jesse Gibson
01b3349657 Build ClientList#run on Client#run
Now, with the sparkling new client API, each client is responsible for
running their own jobs. Instead of inlining all that logic in
ClientList#run, it just dispatches the job to each client and wraps it
in Promise.all. Yay for simplicity!!!
One side effect: job IDs won't be the same across clients.
2016-10-05 08:46:31 -06:00
Jesse Gibson
4d4335ba34 Add Client class
Addressing another panic pain point: you have to jump through insane,
unintuitive hoops just to access a single, non-dynamic client.
Useful for picking out clients and running code on JUST one, without
needing dynamic exclusion lists and `.pluck`.
2016-10-05 08:19:41 -06:00
Jesse Gibson
39e6c465d4 Remove .len()
It used to be how to get the length of a list, then it was deprecated
in favor of using the `.length` getter, now it's being faded out
entirely.
2016-10-04 21:43:45 -06:00
Jesse Gibson
f11aa045b3 Add better code documentation
Added JSDoc annotations to nearly all functions.
2016-10-04 21:15:45 -06:00
Jesse Gibson
14ce8d4e6f 0.4.1 v0.4.1 2016-10-03 19:15:37 -06:00
Jesse Gibson
8640fb6b92 Fix changelog
The last release (v0.4) didn't add an entry to the changelog. Thus, I
assumed the next release would be v0.3.1, but alas, twas not.
Also I changed the style to the keep-a-changelog format.
2016-10-03 19:09:50 -06:00
Jesse Gibson
b220402001 Add method .atLeast
Resolves when a minimum number of clients join (or have joined) your
list.
2016-10-03 17:51:27 -06:00
Jesse Gibson
b26ecab39e 0.4.0 v0.4.0 2016-09-27 14:07:17 -06:00
Jesse Gibson
e72ce823d6 Merge pull request #8 from PsychoLlama/greenkeeper-panic-client-0.3.0
Update panic-client to version 0.3.0 🚀
2016-09-27 13:04:29 -07:00
greenkeeperio-bot
f36e7f50d2 chore(package): update panic-client to version 0.3.0
https://greenkeeper.io/
2016-09-27 12:41:10 -07:00
Jesse Gibson
0cfd4a7671 Merge branch 'master' of https://github.com/PsychoLlama/panic-server 2016-08-13 09:42:27 -06:00
Jesse Gibson
0d7c3b06e9 Add logo for readme
Cool logo/image from Alvaro (soon to link to the new website!). Updated
readme to reflect the direction a bit better...
2016-08-13 09:40:28 -06:00
Jesse Gibson
497c69701e Merge pull request #7 from PsychoLlama/greenkeeper-mocha-3.0.1
Update mocha to version 3.0.1 🚀
2016-08-04 17:18:28 -07:00
greenkeeperio-bot
25b87cb939 chore(package): update mocha to version 3.0.1
https://greenkeeper.io/
2016-08-04 00:43:25 -07:00
Jesse Gibson
3554a7c6db Merge pull request #5 from PsychoLlama/greenkeeper-eslint-3.0.1
Update eslint to version 3.0.1 🚀
2016-07-05 22:46:38 -06:00
Jesse Gibson
6c1fcd1a2e Lint code on npm test
A new npm script has been added, `lint`, which is triggered on the test
command after unit tests pass.
This way, greenkeeper can update lint-related deps and know if it
breaks.
2016-07-05 22:41:02 -06:00
greenkeeperio-bot
a0be6e1e1b chore(package): update eslint to version 3.0.1
https://greenkeeper.io/
2016-07-05 12:26:13 -06:00
Jesse Gibson
8364bf6e58 Merge pull request #3 from PsychoLlama/develop
Develop
2016-05-28 22:54:52 -06:00
Jesse Gibson
ebfced632f Merge branch 'develop' of https://github.com/PsychoLlama/panic-server into develop 2016-05-28 22:43:09 -06:00
Jesse Gibson
0ad6b4b8d3 Upgrade to panic-client v0.2.0, update docs.
Panic-client 0.2 comes with some great new improvements, like supporting back through IE6, making async functions more brief, and preventing implicit
scope injection except under a new flag, '@scope'. This commit updates
the docs to reflect the changes from panic-client, and updates the
client version dependency.
2016-05-28 22:31:39 -06:00
Jesse Gibson
7425aaac2d Rename .len() to .length, allow subclassing, export client bundle.
Instead of calling a method to find the length of a list, you can use a
property (which is a getter under the hood, doing the same thing as
`.len()`). This is cleaner and more intuitive, aligning itself more with
arrays.
Subclassing is now facilitated by a new method, `.chain`. It creates a
new list instance by calling the constructor property, instead of
statically creating a new ClientList instance. This allows you to
create subclasses that inherit from ClientList, without losing that
inheritance when calling `.filter` or `.pluck` (methods which create new
list instances).
The client bundle is now exported lazily, so when you import panic,
there's a `client` getter which memoizes a fs call for the client code.
This allows compatibility on pre-3.0 versions of npm, where other packages
might not be able to recursively find `panic-client`. Also, since it's a
getter, it doesn't do the file system call until it's needed.
2016-05-28 21:16:23 -06:00
Jesse Gibson
1e1eeb118b Rename .len() to .length, allow subclassing, export client bundle.
Instead of calling a method to find the length of a list, you can use a
property (which is a getter under the hood, doing the same thing as
`.len()`). This is cleaner and more intuitive, aligning itself more with
arrays.
Subclassing is now facilitated by a new method, `.chain`. It creates a
new list instance by calling the constructor property, instead of
statically creating a new ClientList instance. This allows you to
create subclasses that inherit from ClientList, without losing that
inheritance when calling `.filter` or `.pluck` (methods which create new
list instances).
The client bundle is now exported lazily, so when you import panic,
there's a `client` getter which memoizes a fs call for the client code.
This allows compatibility on pre-3.0 versions of npm, where other packages
might not be able to recursively find `panic-client`. Also, since it's a
getter, it doesn't do the file system call until it's needed.
2016-05-27 16:07:09 -06:00
Jesse Gibson
fa2da9920c Fix ClientList constructor property
Previously, since it wasn't explicitly set, it was referring to the
EventEmitter constructor.
2016-05-05 10:48:42 -06:00
Jesse Gibson
5bc03a2047 Don't extend Function.prototype
Instead of extending the Function's prototype with the `toJSON()`
method, since the `v0.1.0` refactor all functions have a narrow entry
point, meaning you can simply call `String(callback)`. The prototype is
no longer extended. Changelog and package.json updated.
2016-05-03 12:28:00 -06:00
Jesse Gibson
9a4c36a7b8 Added short section on using co.js
In the async/await section, it wouldn't have been the same without
mentioning our supreme leader Tj Holowaychuk and his co js library.
Basically a syntax sugar using generators over promises. Added a short
demo of how to use it with panic.
2016-05-02 15:33:23 -06:00
Jesse Gibson
b18bbc6071 Merge pull request #2 from PsychoLlama/number-constraint-filter
Add client max method, fix `.excluding` bugs
2016-05-02 15:19:39 -06:00
Jesse Gibson
e7eea4286a Add client max method, fix .excluding bugs
There's a new method called `.pluck` that limits a list's length,
allowing you to arbitrarily pick out clients and select them for tasks.
The version has been bumped, changelog updated and readme modified.
Also, the `.excluding` method wasn't reactively checking to see if the
exclusion set was reduced, only added to. All tests passing.
2016-05-02 15:12:25 -06:00
Jesse Gibson
1f3586eba8 Merge pull request #4 from PsychoLlama/create-merged-list
Expose the ClientList, add super list feature
2016-05-02 12:50:33 -06:00
Jesse Gibson
5a6738bd7f Expose the ClientList, add super list feature
The `panic` object has a new property, `ClientList`, that allows users
to create their own lists easily. It brings in a new feature: you can
pass subgroups into the constructor as an array and it'll source it's
clients from them, allowing groups to be created from smaller
ones. Readme, changelog, npm version, and tests updated.
2016-05-02 12:46:13 -06:00
Jesse Gibson
05ddb23631 Fix documentation mistakes, remove duplicate examples
An example showing how to import code was showing the root route, which
has been deprecated in favor of /panic.js. Some examples were
duplicated, such as how to import client code. Now one simply links to
the other.
2016-05-02 11:28:06 -06:00
Jesse Gibson
e1ce854a9c Allow sharing of http.Server instances
`panic.serve` has been replaced with `panic.server`, which accepts
`http.Server` instances instead of options and always returns the
instance. This allows you to run one server and share it, instead of
creating one for each task. Also added a changelog to keep track of...
changes.

Breaks compatibility with `panic.serve`.
2016-05-01 13:55:15 -06:00
Jesse Gibson
d67425fe1a Merge branch 'master' of https://github.com/gundb/panic-server 2016-04-29 18:13:27 -06:00
Jesse Gibson
d031123e29 Add panic-client dep@latest 2016-04-29 18:12:43 -06:00
Jesse Gibson
5feeecd80b Merge branch 'simplify' 2016-04-29 17:50:56 -06:00
Jesse Gibson
0d6faa111e Merge pull request #3 from PsychoLlama/simplify
Simplify
2016-04-29 17:49:36 -06:00
Jesse Gibson
bfcd2df572 Bump minor version, remove .set[deprecated]
The version has hit it's first ever 0.1.0, and that comes with the
change of removing `.set()` entirely, since scope is now passed with the
function that uses it in `.run()`.
2016-04-29 17:22:10 -06:00
Jesse Gibson
4c50671892 Add shields.io badges, bump minor version, fix require path. 2016-04-29 15:29:01 -06:00
Jesse Gibson
f2b9332fa3 Merge pull request #1 from PsychoLlama/simplify
Simplify
2016-04-29 15:11:12 -06:00
Jesse Gibson
6e9163c2dc Minor docs refactor 2016-04-29 15:09:06 -06:00
Jesse Gibson
6f9ebab74b Add extensive documentation on all methods.
Every method exposed through the clientList (except .set[deprecated])
has been thoroughly documented in the readme.md file.
2016-04-29 14:55:58 -06:00
Jesse Gibson
1e95482b34 Add scope controls, loosely type check platform queries.
All tests passing.

Added a new keyword (cross-platform) to the package.json file.

Optionally, scope variables can be sent to the clients in the `.run`
method.

Platform queries are now loosely type checked. This allows you to match
a number against a string (or vice versa), such as a version or
architecture.
2016-04-29 13:05:49 -06:00
Jesse Gibson
72aa80d9bd Ignore all notes. 2016-04-27 18:32:47 -06:00