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

Handle ngrok version 3 #272

Merged
merged 11 commits into from
Mar 13, 2023
Merged

Handle ngrok version 3 #272

merged 11 commits into from
Mar 13, 2023

Conversation

philnash
Copy link
Collaborator

I think this is all that is needed to handle ngrok 3 (#271). It updates the authtoken function to handle making a different command based on whether the underlying ngrok executable is version 2 or version 3. It also adds an upgradeConfig method to upgrade ngrok config so that the new version can read it.

@bubenshchykov
Copy link
Owner

looks great to me! thanks again <3

@viralpickaxe
Copy link

Hey guys 👋🏻, do we know when this is going to get a merge? 👀

@bubenshchykov
Copy link
Owner

bubenshchykov commented May 4, 2022

@philnash, do you see any concerns merging it? LGTM

@smithki
Copy link

smithki commented May 18, 2022

Really looking forward to seeing this merged!

@philnash
Copy link
Collaborator Author

Apologies, I’ve been travelling bunch recently and not able to spend time with this. I’ve no concerns merging, and I can do next week. But if @bubenshchykov wants to and make a release I’m perfectly happy with that too.

@philnash
Copy link
Collaborator Author

So, I think the download of ngrok version 3 is a different URL to the download of version 2. This means that this change is not required under version 2, and indeed we can take a step back, update the download URLs and make a major version change in this library to bring in ngrok 3.

This commit refactors a couple of things too. Mostly it extracts things from the src/process.js file. Neither the version or authtoken commands need the process (they both spawn their own processes briefly), so they had no business colocating.

This allowed the setAuthToken function to break out into a few utility functions and make the function more understandable overall. The new src/version.js didn't change much from when it was in src/process.js, but relocating it did allow for removing some requires at the top of src/process.js
@philnash
Copy link
Collaborator Author

I think this is ready for an actual review, with an eye on merging and releasing version 5 of this library!

Note, I still haven't used any of the new ngrok features (OAuth, etc) so I don't know how that works yet, or whether this library fully supports using that. That's something to find out though, as we release the new version and find out who wants to use those features.

@russorat
Copy link

Thanks @philnash ! anything we can do to move this forward?

@russorat
Copy link

russorat commented Mar 3, 2023

Hi, PM from ngrok here. Really looking to get this PR moving. Let me know if there's anything I can help with.

@meetkoriya13
Copy link

@philnash any updates on when this is getting merged?

@bubenshchykov bubenshchykov merged commit b351812 into master Mar 13, 2023
@bubenshchykov
Copy link
Owner

bubenshchykov commented Mar 13, 2023

@philnash, PR looks good, I merged it, super sorry if I caused a delay.

I don't have a laptop at the moment to fix a small test failure (one of ngrok error texts changed) and to bump the version on npm. Could you please do it?

@philnash
Copy link
Collaborator Author

Hey @bubenshchykov! I just hadn't got around to this too, wasn't necessarily blocked on you.

I will try to find some time this week to fix the failure and push out a beta/rc version. I'd really like to test this out in my VSCode extension to make sure it works ok and to hopefully write up any migration requirements too.

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.

None yet

6 participants