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

Allow to use the id param without compose when running preevy urls command #133

Closed

Conversation

Yshayy
Copy link
Contributor

@Yshayy Yshayy commented Jul 18, 2023

In similar fashion to down and to some degree, docker compose, allow users to get the URLs of the environments without the need to specify the compose files or project name.

Currently, the resolver already uses the envId in this flow:

const resolver = tunnelNameResolver({ userDefinedSuffix: envId })

So, the behavior should be consistent

const projectName = (await this.ensureUserModel()).name
log.debug(`project: ${projectName}`)
const envId = flags.id || await findAmbientEnvId(projectName)
const [envId, projectName] = flags.id ? [flags.id, flags.id] : await (async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

giving the id as the projectName is confusing.

it's working because projectName is actually not needed by tunnelUrlsForEnv and commands.url. should probably refactor that out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, I should remove project param from:

export const tunnelUrlsForEnv = (

@royra
Copy link
Collaborator

royra commented Jul 24, 2023

a fix for this is in #141

@royra
Copy link
Collaborator

royra commented Jul 24, 2023

fixed by #141

@royra royra closed this Jul 24, 2023
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