-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3 fixClientId #478
Closed
Closed
v3 fixClientId #478
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* poc for new login auth * remove unused code from poc * no need client secret for auth code * some fixups * better port selection * avoid race condition * Update src/commands/login.ts Co-authored-by: Cleve Stuart <[email protected]> * Update src/commands/login.ts Co-authored-by: Cleve Stuart <[email protected]> * surface error_description and leverage open() to for oauth prompt * move login command to yargs --------- Co-authored-by: Cleve Stuart <[email protected]> Co-authored-by: Ashton Eby <[email protected]>
* add schema push command * add schema pull, status commands * address pr feedback
* improve schema commands, add fetch wrapper, add verbosity controls * breakout frontdoor client and get login working * improve error handling, logging, standardize help text capitalization * wip * wip * wip * finish error handling tests, behavior * more fixes * basic login test with mocked oauth and account --------- Co-authored-by: Ashton Eby <[email protected]>
this commit: - adds several tests for schema commands - adds mocha root hooks to clean up sinon - adds sinon-chai for better assertion syntax - swaps @cloudcmd/stub for sinon in most places - rewrites schema pull helpers to parallelize work
also fixes a few bugs in those commands and stubs out the functionality to test for other commands.
* extend makeFaunaRequest to include request body * rewrite schema push to use makeFaunaRequest * fix URL constructors and error handlers * remove @cloudcmd/stub in favor of sinon * add test watch mode and junit reporter * Updated config.yml
* watch mode doesn't work; change script back to one-shot * normalize paths and resolve ~ in paths * clean up types, enable @ts-check in more places * fix schema push and pull commands also adds a few types and another test
* delete unused files * remove unused dependencies and package.json scripts * upgrade eslint, remove babel * update awilix and open * upgrade prettier * upgrade types * upgrade inquirer * upgrade husky * clean up entrypoint
* refresh credentials during fetch calls * don't create dupe keys * Update src/config/setup-test-container.mjs Co-authored-by: echo-bravo-yahoo <[email protected]> * logger component * refactor credentials * refactor credentials * separate concerns of account and database creds into separate classes * revert create database changes * get rid of authnz middleware * further separate concerns * fix directory for creds. add some env var options * fix lint * skip busted test * unsafe accessor fix * try test fix * fix tests * don't set a default role in the args. resolve it in credentials. mock homedir * readme and remove .fauna dir * don't use exit just throw an error --------- Co-authored-by: echo-bravo-yahoo <[email protected]>
* Rename query to fql * Hook up creds for database paths * Remove old fauna client helpers * Move common validator to command helpers * Update examples to use -d and -r for now
* Support running commands against container. * Complete rebase * Keep test deleted * Remove duplicate options * Fix test to look for correct args * Add tests * Remove dead code * Remove more dead code
…et is not. Always respect argv.secret when getting a secret with FaunaClient.getSecret. (#449) * FE-5990 Set argv.secret to 'secret' when --local passed in and --secret is not. Always respect argv.secret when getting a secret with FaunaClient.getSecret. * fix javadoc type * Update src/lib/fauna-client.mjs * Update src/lib/fauna-client.mjs * Use middlware * Use middleware not check * Move middlware to the cli.mjs * Don't look for local. Rely on the middlware to set secret --------- Co-authored-by: Paul Paterson <[email protected]>
… when --local applies changes to argv. (#450) * Move middleware to separate method for testability. Add debug logging when --local applies changes to argv. * Use constants for default settings * Put applyLocalArg in array of middleware run post-validatoin
* spruce up the list database command * fix for linter * return from listDatabases * appease linter for real * add tests * appease linter again * fix bug * add more tests * appease linter
…l used. (#452) * Confirm correct usage of Fauna instead of the Account API when --local used. * Run all the tests
Co-authored-by: E. Cooper <[email protected]>
* Support colorizing output in database, query, and shell commands * Add a tty check for colorized output in the format helper functions
* add methods to command signature for database, schema from the top level command (`fauna`), the help text shows the key command as: ``` fauna key <method> ``` while it shows database and schema as: ``` fauna database fauna schema ``` this commit standardizes the signature (and thus help text) to the style used by keys - `fauna <command> <method>`. * make command definitions consistent minor refactor of how we declare commands for consistency. no customer-facing changes.
* Implement shell history
* support --database in all database commands * support --database in database create * support --database in database delete * test new validation * unclobber logging change * fix test * don't duplicate refresh logic * put common validation in one place * fix tests * appease linter
there are a bunch of places where we want to rely on argv _before_ yargs is formally done parsing them. in those situations we rely on a patchwork of different strategies, with different failings. this commit moves towards a new strategy - using yargs-parser 'raw' (not through yargs). this is primarily to prevent yargs' parsing side effects (running command handlers, overwriting help text, etc). from a customer-facing perspective, this change allows us to emit verbose debugging logs earlier - without it, verbose debugging doesn't work in steps like config parsing.
previously, we'd disabled the --version flag on all commands to not conflict with the --version flag that switched between FQL v4 and FQL v10 behavior. now that the flag that does that switching is named --api-version, we can implement the more standard --version behavior by showing the CLI application version.
* Add improved error handling for known and unknown errors --------- Co-authored-by: echo-bravo-yahoo <[email protected]>
right now, we present all the options in one blob. this change groups the config options into these groups: - Output (format, quiet, color) - Config (config, profile) - API (user, role, database, secret) - Debug (verbosity, verboseComponent) - Options (help and all command-specific options) these groups can/should be renamed and rearranged, but this grouping should be a readability improvement over the current soup of flags.
* support short hand region groups like us & eu
* disable strict options parsing env variables for query settings (FAUNA_SECRET, etc) are too useful to not have set, but they fail strict options parsing for commands that don't use them. this commit turns off strict options parsing for now while we find a better way to address this. * Catch unknown commands --------- Co-authored-by: E. Cooper <[email protected]>
* Add dynamic key support to schema * Fix missing container resolution --------- Co-authored-by: echo-bravo-yahoo <[email protected]>
* Remove some options from login command * help text suggestions Co-authored-by: James Rodewig <[email protected]> --------- Co-authored-by: E. Cooper <[email protected]> Co-authored-by: James Rodewig <[email protected]>
right now, 6 tests in the general CLI test suite rely on terminal color escape sequences. these are a pain to get consistent across environments and multiple developers' terminals - so for now, let's remove the escapes sequences from the text we assert and run the commands without color. Co-authored-by: E. Cooper <[email protected]>
* lint and prettify on PR push/change this change updates the linting github action to commit the changes that prettier causes. this will keep the codebase consistently prettified without requiring client-side git hooks. it could also commit linting changes (by running `npm run lint --fix`), but this PR does not enable that out of an abundance of caution for the changes the linter might introduce. * add husky commit hook for linting * fail CI tests if they encounter `.only` * run prettier, eslint on whole project
* Don't parse for help or version when doing config * Use yargsParser in configuration middleware * use yargs-parser; fix tests --------- Co-authored-by: Ashton Eby <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
homedir
provided by the container (Usehomedir
provided by the container #436)database list
command (Finish thedatabase list
command #448)--database
in database commands ([FE-6155] - Support--database
in database commands #454)Ticket(s): FE-###
Problem
Explain the context and why you're making that change. What is the problem you're trying to solve? In some cases there is not a problem and this can be thought of being the motivation for your change.
Solution
Describe the modifications you've done.
Result
What will change as a result of your pull request? Note that sometimes this section is unnecessary because it is self-explanatory based on the solution.
Testing
Describe the manual and automated tests you completed to verify the change is working as expected.