Skip to content

Porting top-level commands to TS (auth and filemanager) #1401

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

Merged
merged 8 commits into from
Mar 26, 2025

Conversation

brandenrodgers
Copy link
Contributor

@brandenrodgers brandenrodgers commented Mar 17, 2025

Description and Context

Ports these files to TS:

  • auth
  • init
  • mv
  • list
  • remove
  • open

Screenshots

TODO

  • Add tests for the ported commands that don't already have them

Who to Notify

@brandenrodgers brandenrodgers marked this pull request as ready for review March 17, 2025 21:29
commands/auth.ts Outdated
'auth',
authType,
TRACKING_STATUS.ERROR,
providedAccountId!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use the account that was just authed if account id wasn't provided?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We likely won't have it because this case gets hit whenever something in the try/catch goes wrong. If this gets hit, it's very likely that the config was never updated with the new id

commands/init.ts Outdated
'init',
authType,
TRACKING_STATUS.STARTED,
providedAccountId!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here with using the account you attempted to auth

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can do this because we won't know the account ID until the request for the access token comes back. We'll only know it if the user passes in a providedAccountId. So in most cases this will be undefined, but I figured it might be nice to pass it in whenever it does exist. Not sure how much value we'll get out of it though 🤷

@brandenrodgers brandenrodgers requested a review from camden11 March 21, 2025 20:35
camden11
camden11 previously approved these changes Mar 24, 2025
@brandenrodgers brandenrodgers merged commit 578a442 into main Mar 26, 2025
1 check passed
@brandenrodgers brandenrodgers deleted the br/ts-port-top-level-1 branch March 26, 2025 21:44
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