17 Commits

Author SHA1 Message Date
Salman Mitha
99269cc567
Removed upload/auth functionalities (#263) 2020-11-24 15:47:30 -08:00
greenkeeper[bot]
a9cc2bf55a Update open to the latest version 🚀 (#192)
* fix(package): update open to version 7.0.0

* use the new `url` option
2019-10-17 15:00:03 +02:00
Renée Kooi
7d902cb448
Print authentication URL if browser is not available (#178)
* Print URL if open() failed

* Detect SSH sessions (so we dont silently start elinks in the background)

* Fix tests

* Add ssh auth test
2019-10-15 16:47:30 +02:00
Renée Kooi
1bba02a828
Switch opn to open (#177)
* Switch `opn` to `open`

`opn` is no longer maintained and moved to the `open` package name.

* Fix lint
2019-07-16 12:09:55 +02:00
greenkeeper[bot]
c4e6fcb284 Update standard to the latest version 🚀 (#175)
* chore(package): update standard to version 13.0.1

* standard --fix
2019-07-12 09:48:37 +02:00
Renée Kooi
5338b2e68d
Display error message from server if available (#167) 2019-06-04 13:04:46 +02:00
Renée Kooi
16de0011a4
tmp → tempy (#150)
* tmp → tempy

`tmp` adds a SIGINT handler that was causing Clinic to exit prematurely.
`tempy` lets the OS clean up the files.

We're not dealing with massive temporary files, and not with secrets
either, so it's ok for them to stick around for a while.

* Fix test
2019-04-02 16:26:50 +02:00
Renée Kooi
03c4613113
Set default output directory to $cwd/.clinic (#136)
* Set default output directory to $cwd/.clinic

* Fix tests on windows

* consistent quotes
2019-03-21 16:29:01 +01:00
Renée Kooi
0ca696d118
Let users specify custom Ask message on CLI (#126)
* Let users specify custom Ask message on CLI

Opens the $EDITOR in order to add a message.

A temporary file is placed in `profiledir/ASK_MESSAGE`. If the profile
is super broken and didn't output a directory, it uses a temporary file
… somewhere (whatever the `tmp` module decides to do).

* handle empty message

* Expand initial message and fix trailing newlines

* Ask usability updates

- `getAskMessage` gets its own file
- vim starts in insert mode with the cursor at the end of the file
- VS Code forks and returns control to the CLI on start, so we can't
easily wait for it to exit; instead, we wait for user confirmation if
the editor closed within 2 seconds without updating the ASK_MESSAGE file.

* reword to avoid 'no quotes' stuff

Co-Authored-By: goto-bus-stop <renee@kooi.me>
2019-03-06 13:38:06 +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
Renée Kooi
75f80771b4
Disable clinic upload in old CLI. (#117)
Tell users to update because the Upload Server requires authentication
now.

![image](https://user-images.githubusercontent.com/1006268/52706545-f7705200-2f85-11e9-9235-0105f51261e0.png)
2019-02-13 12:52:08 +01:00
Ruben Bridgewater
66237079cc
Update standard to v.12 and add lint script (#50) 2018-08-29 12:05:02 +02:00
Mathias Buus
af7b8855f9 clean lingering node_trace files on clean as well (#49)
* clean lingering node_trace files on clean as well

* disable appveyor cache
2018-06-25 20:32:28 +02:00
Mathias Buus
2227450876 stricter filtering on the client when using upload (#33) 2018-01-26 17:29:37 +00:00
Mathias Buus
40670204c1 Measure size of gzip instead of raw payload (#34) 2018-01-26 17:10:56 +00: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