-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: prompt for login any time a user omits API key (#636)
* feat: prompt for login any time a user omits API key * chore: lint * test: stricter login tests * test: add nock cleanup to docs:edit so it's consistent * test: update all affected tests Now we split our `--key` tests into two tests: one for CI, and one for non-CI. * chore: remove unnecessary JSDoc TS handles this now * refactor: add boolean to info statement to hide prefix ... and refactor console.info statements to use that instead * refactor: remove redundant else Co-Authored-By: Jon Ursenbach <[email protected]> Co-authored-by: Jon Ursenbach <[email protected]>
- Loading branch information
1 parent
31b5bae
commit 542307b
Showing
40 changed files
with
303 additions
and
156 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ describe('rdme login', () => { | |
it('should post to /login on the API', async () => { | ||
prompts.inject([email, password, project]); | ||
|
||
const mock = getAPIMock().post('/api/v1/login').reply(200, { apiKey }); | ||
const mock = getAPIMock().post('/api/v1/login', { email, password, project }).reply(200, { apiKey }); | ||
|
||
await expect(cmd.run({})).resolves.toBe('Successfully logged in as [email protected] to the subdomain project.'); | ||
|
||
|
@@ -50,7 +50,7 @@ describe('rdme login', () => { | |
it('should post to /login on the API if passing in project via opt', async () => { | ||
prompts.inject([email, password]); | ||
|
||
const mock = getAPIMock().post('/api/v1/login').reply(200, { apiKey }); | ||
const mock = getAPIMock().post('/api/v1/login', { email, password, project }).reply(200, { apiKey }); | ||
|
||
await expect(cmd.run({ project })).resolves.toBe( | ||
'Successfully logged in as [email protected] to the subdomain project.' | ||
|
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
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
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
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
Oops, something went wrong.