* chore: bump tap version
* chore: add v16 to test matrix
* chore: update coverage settings to latest tap version
* chore: use taprc
* chore: support v17
* chore: updade coverage settings
* Fixed test for bubbleprof full
* Fix for bubbleprof visualize test
* Fix for doctor full test
* Another fix for bubbleprof visualize
* Fix for doctor visualize test
* Fixes for flame full and doctor visualize tests
* Fix for flame visualize test - all tests passing
* Promisify command handlers
* Implement --upload
* tweak UI, delete files after upload
* Revert to previous phrasing so i dont have to update a million tests
* lint fix
* add --upload test
* lint fix
* chore(package): update tap to version 13.0.0
* tap 13.1
* distinct error message if clinic process exits with signal
* Update expected error messages
* Revert "Update expected error messages"
This reverts commit 781975cad4d02506922598ed21aeab48f375423b.
* Revert "distinct error message if clinic process exits with signal"
This reverts commit 4ee03da4cac246f70a949e5a0aaa1a3a640c7da9.
* fix exit code expectations for clinic doctor
* show dependencies in build output
* tap 14
* Set tap to -j1
* disable coverage on node 8 because 0x doesnt work with it
* 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
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 :)
* 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>
* 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
* Add --autocannon flag, shorthand to '--on-port autocannon'
* Mention --autocannon in wrk/autocannon explanation
* fix --autocannon check
* Fix arg list in autocannon test
* wtf is this doing in my commit
* Strip trailing slash from --visualize-only.
* add --visualize-only tests for flame
* Use platform path separator in test.
* Support windows path separators.
* Add --dest to clinic flame.
* Add --dest to clinic bubbleprof.
* Add cli-flame-full test.
* Add --dest tests for each tool.
* Update tools to versions that have --dest.
* 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.
* support --http in doctor
* @mcollina comments plus more docs
* test this on windows
* fix typo
* refactor to --on-port
* use stable clinic-doctor
* remove extra log
* 0x-integration
* 0x v3.0.0
* docs
* fixes
* more fixes
* more docs
* --full-help -> --all-options
* add tests
* ignore 0x on ci
* ignore 0x in code coverage
* ignore code coverage
* separate test-local into its own script (needs sudo), and fix test-local requires