Skip to content

feat(apps): add --type option to apps:create#154

Merged
robingenz merged 1 commit into
mainfrom
feat/apps-create-type
May 1, 2026
Merged

feat(apps): add --type option to apps:create#154
robingenz merged 1 commit into
mainfrom
feat/apps-create-type

Conversation

@robingenz

Copy link
Copy Markdown
Member

Summary

Adds a new optional --type flag to the apps:create command so users can create non-Capacitor apps on Capawesome Cloud.

  • Supported values: android, capacitor, cordova, ios (alphabetical).
  • Defaults to capacitor to preserve existing behavior.
  • The default is applied inside the action (rather than via Zod's .default()) so the option remains structurally optional for the programmatic call site in src/utils/prompt.ts.

Changes

  • src/types/app.ts — new AppType union; added type: AppType on CreateAppDto.
  • src/commands/apps/create.ts — new --type option; default applied via options.type ?? 'capacitor'.
  • src/commands/apps/create.test.ts — updated assertions to include type in request body.

Test plan

  • npx tsc --noEmit passes.
  • npx vitest run — all 157 tests pass.
  • npm run fmt — clean.
  • Manual: apps:create without --type still creates a Capacitor app.
  • Manual: apps:create --type cordova / --type android / --type ios round-trips through the API.

Adds a new optional `--type` flag to specify the app type.
Supported values: `android`, `capacitor`, `cordova`, `ios`.
Defaults to `capacitor` to preserve existing behavior.
Copilot AI review requested due to automatic review settings May 1, 2026 16:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 AppType and adds type to CreateAppDto.
  • Adds --type option to apps:create and applies a default of capacitor in the command action.
  • Updates apps:create tests to include type in 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.

Comment thread src/commands/apps/create.test.ts
@robingenz robingenz self-assigned this May 1, 2026
@robingenz robingenz added the feature Feature label May 1, 2026
@robingenz robingenz merged commit c23c877 into main May 1, 2026
7 checks passed
@robingenz robingenz deleted the feat/apps-create-type branch May 1, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants