feat(apps): add --type option to apps:create#154
Merged
Conversation
Adds a new optional `--type` flag to specify the app type. Supported values: `android`, `capacitor`, `cordova`, `ios`. Defaults to `capacitor` to preserve existing behavior.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a --type option to the apps:create CLI command to support creating non-Capacitor apps while preserving the existing default behavior (capacitor).
Changes:
- Introduces
AppTypeand addstypetoCreateAppDto. - Adds
--typeoption toapps:createand applies a default ofcapacitorin the command action. - Updates
apps:createtests to includetypein the expected request payload.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/types/app.ts | Adds an AppType union and includes type in CreateAppDto for app creation requests. |
| src/commands/apps/create.ts | Adds --type option and ensures a default (capacitor) is applied before calling the API. |
| src/commands/apps/create.test.ts | Updates request expectations to include type in the POST body. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new optional
--typeflag to theapps:createcommand so users can create non-Capacitor apps on Capawesome Cloud.android,capacitor,cordova,ios(alphabetical).capacitorto preserve existing behavior..default()) so the option remains structurally optional for the programmatic call site insrc/utils/prompt.ts.Changes
src/types/app.ts— newAppTypeunion; addedtype: AppTypeonCreateAppDto.src/commands/apps/create.ts— new--typeoption; default applied viaoptions.type ?? 'capacitor'.src/commands/apps/create.test.ts— updated assertions to includetypein request body.Test plan
npx tsc --noEmitpasses.npx vitest run— all 157 tests pass.npm run fmt— clean.apps:createwithout--typestill creates a Capacitor app.apps:create --type cordova/--type android/--type iosround-trips through the API.