8 Commits

Author SHA1 Message Date
Renée Kooi
3512b75520
Cleanup temporary profiles after test run (#160)
Helps with disk space on long running machines (eg CITGM ran into space
issues)

And with RAM usage on low end laptops with an in-memory /tmp :)
2019-06-04 13:05:10 +02:00
Renée Kooi
f1e2eef0ac
Reduce test output noise (#143)
We have quite a few tests that assert that something went wrong in the
expected way, and each of these would log debugging output. That's fine
on its own but it did make test output eg on CITGM quite confusing,
because many of the things that look like failures are actually not.

These can be added back easily locally of course for debugging :)
2019-03-26 11:57:29 +01:00
Renée Kooi
3cbe86ec5d
Next (#118)
* clinic ask (#66)

The `ask` command is used to upload on the private area, e.g.: 
```
clinic ask --upload-url=http://localhost:3000 11213.clinic-bubbleprof
```
This will:
- Start the authentication on upload server to obtain a JWT token
- Upload the data to the protected API `/protected/data` on upload server

On the server side, the API can extract the user email from the JWT token to correctly identify the "private" folder for the user

* Authenticate for public uploads and support private uploads without `ask`ing (#102)

`clinic upload xyz.clinic-doctor` now also requires authentication.

A new `clinic upload --private` flag uploads to your private area.

`clinic ask` does `clinic upload --private` and then calls a currently-noop function that can be implemented once we have a `/ask` endpoint on the server.

* Store auth tokens in ~/.node-clinic-rc (#108)

Stores the JWT in ~/.node-clinic-rc after logging in. ~/.node-clinic-rc is a JSON file with upload URLs as keys, JWTs as values.

Use `clinic login` to login manually. Optionally specify an `--upload-url`.
Use `clinic logout` to logout manually. Optionally specify an `--upload-url`. Add `--all` to log out of all Clinic Upload servers, this deletes the ~/.node-clinic-rc file.
Use `clinic user` to show a list of current sessions. Optionally specify an `--upload-url` to only show that session.

You can use the `CLINIC_CREDENTIALS` environment variable to point to a different file. I added this for tests, maybe it's also useful in programmatic environments and warrants docs?

`clinic upload` and `clinic ask` automatically do what `clinic login` does at the start.

* Feature/ask auth flag (#114)

* [666] - Add ask param flag to login URL when authenticating using ask command

* [666] - Factor user terms acceptance into CLI login when validating JWT payload against upload type

* Implement ask with placeholder message (#115)

Means we'll have to reply first to figure out what someone needs help with but it's better than not getting a message at all

* 3.0.0-beta.0@next

* Fix/private public auth redirect (#116)

* Re #99 - Pass flag for private uploads to login URL so app can differentiate intent

* Re #97 - Open new tab on upload callback and create flag to prevent this behaviour if desired

* Re #97 - Update browser open flag to use recommended minimist syntax

* Revert "Disable clinic upload in old CLI. (#117)"

This reverts commit 75f80771b4741a4927788a2d492566d04416e1b7.

* Update tool versions.

* remove weird test? unsure what this was for
2019-02-13 14:34:53 +01:00
azure-pipelines[bot]
1080fe1a38 Set up CI with Azure Pipelines (#93) 2018-12-03 19:17:42 +01:00
Renée Kooi
551c824e7a Add CLI metrics and update notifications (#68)
* Track tool use.

* Wait for permission before starting tools.

* Add update-notifier.

* Only ask for metrics permission if we'd actually use it.

Not for basic stuff like --help and --version.

* Disable Insight in tests.

* Avoid swallowing errors in Promise chains.

* Fix Insight optOut override for tests.

* Stub GA tracking code.

* Remove unused errors from callbacks.

* 100% cov

* Configure GA tracking code.
2018-10-25 16:07:17 +02:00
greenkeeper[bot]
fdd7a1e883 Update dependencies to enable Greenkeeper 🌴 (#12)
* chore(package): update dependencies

* docs(readme): add Greenkeeper badge

* standard 11
2018-04-13 15:29:55 +02:00
Mathias Buus
1964d35b01 add clinic clean (#31) 2018-01-25 23:16:09 +01:00
Andreas Madsen
a40328e736
prepear for public release 2018-01-19 23:06:16 +01:00