chore(release): @getbrevo/cli@2.3.0 - #107
Merged
Merged
Conversation
|
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.



📦 Release summary
@getbrevo/cliReleases
@getbrevo/cli@2.3.0
Minor Changes
4379784: Add
functionas a first-class app type in the CLI's app-type registry. A Brevo Function app is now detected by the presence ofbrevo_functionin both the local config and the server record, and participates in the same resolution, capability, and recoverability checks asoauthanduiapps. The capability matrix grants a private Function app no OAuth or UI capabilities (it ships its ownbrevo function deployflow); public distribution addsreview-lifecycle. A newapp_typefield is written toapp-config.jsononbrevo app createandbrevo app scaffoldas informational metadata ("oauth","ui", or"function"); it is never sent to the server and legacy configs without it continue to work unchanged. Additional fixes:fetchFunctionListnow paginates past 50 functions,sseStreamrefreshes the OAuth token before connecting,brevo function deployappears in help output, andresolveFunctionIdreplaces a duplicated IIFE in the shared action runner.Refuse a
brevo app uploadwhoseapp_typecontradicts the blocks it sits next to.app_typestays informational — the presence ofui_app/brevo_function/authis still the only discriminator, andisUiAppConfig()is still the only place it is read — but a file labelled"oauth"that carries aui_appblock is a hand-edit that half-landed, anduploadnow says so before any round trip, naming both the declared and the detected type and how to reconcile them. A config that omitsapp_type(every file written by an earlier release) is unaffected: the check is skipped entirely rather than defaulted. The label is never sent to Brevo.Normalize every key in
app-config.jsonto snake_case, matching the wire contract. The file was meant to be snake_case throughout but several keys were camelCase; they are renamed as follows:appId→app_idappName→app_namelogoUri→logo_uriappType→app_typeauth.redirectUris→auth.redirect_urisversion,distribution_type,auth.scopes,ui_appandbrevo_functionare unchanged, and nothing sent to or received from the Brevo API changes.Backward compatibility is preserved. Every command still reads the camelCase spellings written by earlier releases (and the older
auth.redirectUrls), through one shared normalizer in the config reader. When a file carries both spellings of a key with different values the snake_case one wins and a one-line notice is printed to stderr.Legacy files are migrated on write.
brevo app create,brevo app upload,brevo app scaffoldandbrevo app startnow write snake_case keys only, and the camelCase copies are dropped.brevo app uploadandbrevo app scaffoldalso rewrite an in-sync legacy file on their "nothing to change" paths, so running either once is enough to migrate a project. Values are never changed by the migration.The only
--jsonoutput that echoes config key names isbrevo app scaffold'sdiffs[].field, which now reportsapp_name,redirect_urisandlogo_uriinstead ofappName,redirectUrisandlogoUri. TheappId/appName/logoUrikeys in other commands'--jsonoutput are unchanged.Every
--jsondocument now carries each camelCase key together with its snake_case twin:appIdandapp_id,clientIdandclient_id,upToDateandup_to_date, and in the error envelopeexitCode/exit_codeandstatusCode/status_code.brevo app create --json'sredirectUriandbrevo app credentials --json'sredirectUrisare twinned asredirect_uris, the wire name. Array documents (brevo app list --json) alias each element. Nested objects are left as they are —ui_app, the upload diff'scurrent/next, Function records — since they were already snake_case or are the user's own data. Nothing is removed: every existingjq .appIdkeeps working. This is the deprecation step toward one spelling for machine-readable output, matchingapp-config.jsonand the API; the camelCase keys will be removed in the next major release, and new scripts should read the snake_case ones.