@getbrevo/cli 1.0.0-alpha.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @getbrevo/cli
2
2
 
3
- ## 1.0.0-alpha.0
3
+ ## 1.0.0
4
4
 
5
5
  ### Major Changes
6
6
 
7
- - 5507fe1: Initial release of `@getbrevo/cli` — the Brevo Developer CLI for creating, managing, and testing OAuth integrations from the terminal. Published to the public npm registry (`registry.npmjs.org`) under `@getbrevo/cli`.
7
+ - 93dad27: Initial release of `@getbrevo/cli` — the Brevo Developer CLI for creating, managing, and testing OAuth integrations from the terminal. Published to the public npm registry (`registry.npmjs.org`) under `@getbrevo/cli`.
8
8
 
9
9
  **Authentication & setup**
10
10
  - `brevo login` / `brevo logout` / `brevo whoami` — authenticate with a Brevo API key, stored at `~/.brevo/credentials.json`. Invalid keys surface a single, consistent `Invalid API key. Please check and try again.` message on first attempt and on retry.
package/README.md CHANGED
@@ -99,7 +99,7 @@ For non-interactive use (CI), set `BREVO_API_KEY=<key>` before running `brevo lo
99
99
  Environment overrides:
100
100
 
101
101
  - `BREVO_API_URL` — points the CLI at a different Brevo API (defaults to `https://api.brevo.com`).
102
- - `BREVO_OAUTH_PROXY_URL` — points the browser-login flow at a different OAuth proxy (defaults to `https://oauth-cli.brevo.com`; useful for staging or local Worker development).
102
+ - `BREVO_OAUTH_PROXY_URL` — points the browser-login flow at a different OAuth proxy (defaults to `https://oauth-cli.brevo.com`; useful for local development or non-default environments).
103
103
 
104
104
  ## Exit codes
105
105
 
@@ -158,11 +158,25 @@ yarn test # run jest
158
158
  yarn test:ci # jest --coverage
159
159
  yarn lint # ESLint on src/
160
160
  yarn format # prettier --write
161
+ yarn smoke # end-to-end smoke test against the real API (see below)
161
162
  yarn clean # remove dist/
162
163
  ```
163
164
 
164
165
  A husky pre-commit hook runs prettier and eslint on staged `.ts` files and then runs the full test suite.
165
166
 
167
+ ### Smoke test
168
+
169
+ `yarn smoke` exercises the full CLI lifecycle (login → app create → scaffold → start → delete → logout) against the real Brevo API. App creation, scaffold, and start always run via the individual commands (`brevo app create`, `brevo app scaffold`, `brevo app start`). The interactive `brevo app init` wizard is **not** part of the default run — pass `--with-init` to also exercise it as an extra step (which creates and deletes a second app).
170
+
171
+ ```bash
172
+ yarn smoke # default run (no init wizard)
173
+ yarn smoke --with-init # also exercise `brevo app init`
174
+ yarn smoke --skip-auth # assume already logged in
175
+ yarn smoke --ci # API-key auth via BREVO_API_KEY (non-interactive)
176
+ yarn smoke --against=published # run against the published npm package instead of local build
177
+ yarn smoke --help # full flag list
178
+ ```
179
+
166
180
  ### Publishing
167
181
 
168
182
  Releases use [changesets](https://github.com/changesets/changesets) and ship to the public npm registry under `@getbrevo`. **Prefer the CI flow** — pushing changesets to `main` opens a "Version Packages" PR (`.github/workflows/release.yaml`); pushing to a `release-*` branch publishes alpha prereleases (`.github/workflows/pre-release.yaml`). CI provides npm provenance via OIDC. Publish locally only when CI is unavailable.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@getbrevo/cli",
3
- "version": "1.0.0-alpha.0",
4
- "author": "Piyush Sarin",
3
+ "version": "1.0.0",
4
+ "author": "Brevo",
5
5
  "description": "Brevo Developer CLI — create, manage apps and OAuth integrations",
6
6
  "type": "commonjs",
7
7
  "main": "dist/bin/index.js",
@@ -31,6 +31,7 @@
31
31
  "format": "prettier --write 'src/**/*.ts'",
32
32
  "format:check": "prettier --check 'src/**/*.ts'",
33
33
  "mock": "npx @stoplight/prism-cli mock mock/openapi.yaml --port 3112",
34
+ "smoke": "tsx scripts/smoke-test.ts",
34
35
  "clean": "rm -rf dist",
35
36
  "prepare": "husky",
36
37
  "prepublishOnly": "npm run clean && npm run build && npm test",
@@ -55,6 +56,7 @@
55
56
  "lint-staged": "^15.2.0",
56
57
  "prettier": "^3.2.0",
57
58
  "ts-jest": "^29.2.0",
59
+ "tsx": "^4.19.0",
58
60
  "typescript": "^5.7.0"
59
61
  },
60
62
  "lint-staged": {
@@ -72,7 +74,11 @@
72
74
  "license": "MIT",
73
75
  "repository": {
74
76
  "type": "git",
75
- "url": "https://github.com/getbrevo/brevo-cli.git"
77
+ "url": "git+https://github.com/getbrevo/brevo-cli.git"
78
+ },
79
+ "homepage": "https://github.com/getbrevo/brevo-cli#readme",
80
+ "bugs": {
81
+ "url": "https://github.com/getbrevo/brevo-cli/issues"
76
82
  },
77
83
  "publishConfig": {
78
84
  "access": "public",