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

Convert lib/serverlessLogs and lib/buildAccount to TS #1337

Merged
merged 12 commits into from
Jan 16, 2025

Conversation

camden11
Copy link
Contributor

@camden11 camden11 commented Jan 13, 2025

Description and Context

Converts 2 more files to TS. Only two more to go after this!
https://git.hubteam.com/HubSpot/hubspot-cli-issues/issues/684

Who to Notify

@brandenrodgers @kecarroll @joe-yeager

@camden11 camden11 marked this pull request as ready for review January 13, 2025 20:02

beforeEach(() => {
jest.spyOn(process, 'exit').mockImplementation(() => {});
stdinMock = mockStdIn.stdin();
spinnies = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was being passed into tailLogs but not doing anything

portalLimit, // Used only for developer test accounts
force = false,
}) {
export async function buildDeveloperTestAccount(
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 decided to split buildNewAccount into two separate functions. It adds a few extra lines of code, but IMO is much easier to read. I don't think there was a ton of utility in combining them previously, since it only combined two account types and would have been super messy if we ever attempted to add a third. It also was more or less impossible to safely type

Copy link
Contributor

@brandenrodgers brandenrodgers left a comment

Choose a reason for hiding this comment

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

tested locally and this lgtm!

})
);
logger.debug(e);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker, but could this use the debugError() util?

@camden11 camden11 merged commit c045dfb into main Jan 16, 2025
1 check passed
@camden11 camden11 deleted the cp/convert-ts-lib-7 branch January 16, 2025 15:59
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