Skip to content

feat(apps:certificates): deprecate --type option#130

Merged
robingenz merged 2 commits intomainfrom
feat/deprecate-certificate-type
Mar 22, 2026
Merged

feat(apps:certificates): deprecate --type option#130
robingenz merged 2 commits intomainfrom
feat/deprecate-certificate-type

Conversation

@robingenz
Copy link
Member

Summary

  • Deprecate the --type option in apps:certificates:create and apps:certificates:update commands
  • Print a warning when --type is used, as the certificate type is now detected automatically by the API
  • Remove type from the backend payloads and DTOs
  • Keep the CLI option to avoid breaking existing workflows

Copilot AI review requested due to automatic review settings March 21, 2026 06:36
@robingenz robingenz self-assigned this Mar 21, 2026
@robingenz robingenz added the feature Feature label Mar 21, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR deprecates the --type flag for the apps:certificates:create and apps:certificates:update CLI commands by warning when it’s used, while removing type from the create/update request DTOs and payloads because the backend now auto-detects certificate type.

Changes:

  • Removed type from CreateAppCertificateDto / UpdateAppCertificateDto.
  • Stopped sending type in the create multipart payload.
  • Added runtime warnings when --type is provided (and removed the interactive prompt that previously required selecting a type).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/types/app-certificate.ts Drops type from create/update DTOs to match new API behavior.
src/services/app-certificates.ts Removes type from multipart create payload.
src/commands/apps/certificates/create.ts Removes interactive type selection and warns when deprecated --type is used.
src/commands/apps/certificates/update.ts Warns when deprecated --type is used and omits it from update payload.
Comments suppressed due to low confidence (1)

src/commands/apps/certificates/update.ts:55

  • The new deprecation warning behavior in this command isn’t covered by tests. Consider adding a Vitest test asserting consola.warn is emitted when type is provided and that the update call body does not include type, similar to the coverage for other deprecated flags (e.g. apps:channels:create).
    if (type) {
      consola.warn('The --type option is deprecated. The certificate type is now detected automatically.');
    }

    await appCertificatesService.update({
      appId,
      certificateId,
      name,
      password,
      keyAlias,
      keyPassword,
    });

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@robingenz robingenz merged commit c53b766 into main Mar 22, 2026
3 checks passed
@robingenz robingenz deleted the feat/deprecate-certificate-type branch March 22, 2026 07:57
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