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

Feat/tsemach/add create app feature command #78

Merged
merged 7 commits into from
Jan 29, 2024

Conversation

tsemachLi
Copy link
Contributor

package.json Outdated Show resolved Hide resolved
Comment on lines 56 to 71
if (appId) {
const latestDraftVersion = appVersionId ? { id: appVersionId } : await defaultVersionByAppId(Number(appId));
if (!latestDraftVersion) throw new Error('No editable version found for the given app id.');
appVersionId = latestDraftVersion.id;
} else {
appVersionId = flags.appVersionId;
}

if (!appVersionId) {
const appAndAppVersion = await DynamicChoicesService.chooseAppAndAppVersion(false, false, {
appId,
autoSelectVersion: false,
});
appVersionId = appAndAppVersion.appVersionId;
appId = appAndAppVersion.appId;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

this code can be extracted to a shared place IMO

Copy link
Contributor

@gregra81 gregra81 left a comment

Choose a reason for hiding this comment

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

👏 Great work

@tsemachLi tsemachLi merged commit debf453 into master Jan 29, 2024
1 check passed
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