Skip to content
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

Simplify the getAccess method in the CLI #444

Merged
merged 9 commits into from
Sep 20, 2024

Conversation

garrettjstevens
Copy link
Contributor

Since we can parse the flags in the base class, this does so to reduce the verbosity of getAccess().

It also makes some fixes to get rid of some eslint-disable directives

@garrettjstevens garrettjstevens self-assigned this Sep 19, 2024
@garrettjstevens
Copy link
Contributor Author

@dariober When I was removing some of the eslint-disable directives, I realized we were using /dev/stdin to read from stdin. Since that's not portable cross-platform (.e.g. on Windows), I changed it to use process.stdin, but had to make the idReader async to do so. I don't think it affected anything, but would appreciate you double-checking.

Also, should this be removed? From what I remembered, .clirc was what we used before we used the conf package.

const CONFIG_PATH = path.resolve(os.homedir(), '.clirc')

@dariober
Copy link
Contributor

dariober commented Sep 20, 2024

@garrettjstevens Looks good to me

I changed it to use process.stdin, but had to make the idReader async to do so

I changed edit.ts accordingly

Also, should this be removed? From what I remembered, .clirc was what we used before we used the conf package.

Yes, it seems so. I removed it and simplified the checking if user is already logged in (674e4ff).

@garrettjstevens garrettjstevens merged commit d1b6bcb into main Sep 20, 2024
7 checks passed
@garrettjstevens garrettjstevens deleted the cli_simplify_getAccess branch September 20, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants