@getbrevo/cli 1.0.1 → 1.1.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +2 -2
  3. package/agent-context/AGENTS.md +11 -3
  4. package/agent-context/SKILL.md +12 -2
  5. package/dist/bin/index.js +7 -5
  6. package/dist/bin/index.js.map +1 -1
  7. package/dist/commands/app/create.d.ts +1 -0
  8. package/dist/commands/app/create.d.ts.map +1 -1
  9. package/dist/commands/app/create.js +49 -12
  10. package/dist/commands/app/create.js.map +1 -1
  11. package/dist/commands/app/list.d.ts.map +1 -1
  12. package/dist/commands/app/list.js +1 -0
  13. package/dist/commands/app/list.js.map +1 -1
  14. package/dist/commands/app/scaffold.d.ts.map +1 -1
  15. package/dist/commands/app/scaffold.js +3 -2
  16. package/dist/commands/app/scaffold.js.map +1 -1
  17. package/dist/commands/app/scopes.d.ts +2 -0
  18. package/dist/commands/app/scopes.d.ts.map +1 -0
  19. package/dist/commands/app/scopes.js +79 -0
  20. package/dist/commands/app/scopes.js.map +1 -0
  21. package/dist/commands/app/update.d.ts.map +1 -1
  22. package/dist/commands/app/update.js +90 -5
  23. package/dist/commands/app/update.js.map +1 -1
  24. package/dist/commands/definitions.d.ts.map +1 -1
  25. package/dist/commands/definitions.js +44 -1
  26. package/dist/commands/definitions.js.map +1 -1
  27. package/dist/commands/init.d.ts.map +1 -1
  28. package/dist/commands/init.js +15 -2
  29. package/dist/commands/init.js.map +1 -1
  30. package/dist/lang/en.d.ts +23 -2
  31. package/dist/lang/en.d.ts.map +1 -1
  32. package/dist/lang/en.js +24 -2
  33. package/dist/lang/en.js.map +1 -1
  34. package/dist/lib/cli-version.d.ts +2 -0
  35. package/dist/lib/cli-version.d.ts.map +1 -0
  36. package/dist/lib/cli-version.js +59 -0
  37. package/dist/lib/cli-version.js.map +1 -0
  38. package/dist/lib/config.d.ts +1 -1
  39. package/dist/lib/config.d.ts.map +1 -1
  40. package/dist/lib/config.js +15 -1
  41. package/dist/lib/config.js.map +1 -1
  42. package/dist/lib/constants.d.ts +4 -1
  43. package/dist/lib/constants.d.ts.map +1 -1
  44. package/dist/lib/constants.js +10 -2
  45. package/dist/lib/constants.js.map +1 -1
  46. package/dist/lib/validators.d.ts +17 -0
  47. package/dist/lib/validators.d.ts.map +1 -1
  48. package/dist/lib/validators.js +65 -0
  49. package/dist/lib/validators.js.map +1 -1
  50. package/dist/services/app.d.ts +3 -0
  51. package/dist/services/app.d.ts.map +1 -1
  52. package/dist/services/app.js +6 -1
  53. package/dist/services/app.js.map +1 -1
  54. package/dist/services/oauth-metadata.d.ts +7 -0
  55. package/dist/services/oauth-metadata.d.ts.map +1 -0
  56. package/dist/services/oauth-metadata.js +43 -0
  57. package/dist/services/oauth-metadata.js.map +1 -0
  58. package/dist/services/scopes-html.d.ts +3 -0
  59. package/dist/services/scopes-html.d.ts.map +1 -0
  60. package/dist/services/scopes-html.js +337 -0
  61. package/dist/services/scopes-html.js.map +1 -0
  62. package/dist/services/scopes-web.d.ts +12 -0
  63. package/dist/services/scopes-web.d.ts.map +1 -0
  64. package/dist/services/scopes-web.js +95 -0
  65. package/dist/services/scopes-web.js.map +1 -0
  66. package/dist/skills/index.d.ts +2 -1
  67. package/dist/skills/index.d.ts.map +1 -1
  68. package/dist/skills/index.js +3 -22
  69. package/dist/skills/index.js.map +1 -1
  70. package/dist/templates/files/AGENTS.md.tmpl +1 -1
  71. package/dist/templates/files/CLAUDE.md.tmpl +1 -1
  72. package/dist/templates/files/README.md.tmpl +2 -1
  73. package/dist/templates/files/app-config.json.tmpl +1 -1
  74. package/dist/types.d.ts +2 -0
  75. package/dist/types.d.ts.map +1 -1
  76. package/package.json +1 -1
  77. package/dist/lib/min-version-check.d.ts +0 -15
  78. package/dist/lib/min-version-check.d.ts.map +0 -1
  79. package/dist/lib/min-version-check.js +0 -33
  80. package/dist/lib/min-version-check.js.map +0 -1
@@ -0,0 +1,337 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderScopesHtml = renderScopesHtml;
4
+ const constants_1 = require("../lib/constants");
5
+ const en_1 = require("../lang/en");
6
+ function escapeHtml(value) {
7
+ return value
8
+ .replaceAll('&', '&')
9
+ .replaceAll('<', '&lt;')
10
+ .replaceAll('>', '&gt;')
11
+ .replaceAll('"', '&quot;')
12
+ .replaceAll("'", '&#39;');
13
+ }
14
+ function safeJson(value) {
15
+ // Safe for embedding inside <script type="application/json">: only
16
+ // </script> can end the block, so we just neutralise '<'.
17
+ return JSON.stringify(value).replaceAll('<', String.raw `\u003c`);
18
+ }
19
+ // Styling borrows from Brevo's design system (NAOS/SIB tokens) — iris-purple
20
+ // accent and charcoal-grey neutrals. Fonts use a system stack (no CDN fetch
21
+ // or web-font download) so the page renders the same with or without network.
22
+ const STYLES = `
23
+ :root {
24
+ color-scheme: light dark;
25
+ --bg: #ffffff;
26
+ --hero-bg: #f5f5f5;
27
+ --fg: #1b1b1b;
28
+ --muted: #696969;
29
+ --border: #e3e3e3;
30
+ --accent: #6358de;
31
+ --card: #ffffff;
32
+ --card-shadow: 0 1px 2px rgba(28, 28, 28, .08);
33
+ --chip-bg: #efeefc;
34
+ --chip-fg: #3c3585;
35
+ --section-header-bg: #fafafa;
36
+ --error: #cf1a3b;
37
+ --radius-card: 16px;
38
+ --radius-input: 16px;
39
+ --radius-chip: 20px;
40
+ }
41
+ @media (prefers-color-scheme: dark) {
42
+ :root {
43
+ --bg: #0f1224;
44
+ --hero-bg: #181b30;
45
+ --fg: #f1f5f9;
46
+ --muted: #94a3b8;
47
+ --border: #2a2f4d;
48
+ --accent: #b3aeef;
49
+ --card: #1a1e35;
50
+ --card-shadow: 0 1px 2px rgba(0, 0, 0, .4);
51
+ --chip-bg: #2a2949;
52
+ --chip-fg: #c7d2fe;
53
+ --section-header-bg: #161930;
54
+ --error: #ff8d9a;
55
+ }
56
+ }
57
+ * { box-sizing: border-box; }
58
+ body {
59
+ margin: 0;
60
+ padding: 0;
61
+ font: 15px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
62
+ background: var(--bg);
63
+ color: var(--fg);
64
+ -webkit-font-smoothing: antialiased;
65
+ -moz-osx-font-smoothing: grayscale;
66
+ }
67
+ .hero {
68
+ background: var(--hero-bg);
69
+ padding: 2.5rem 1.5rem 2rem;
70
+ }
71
+ .hero-inner { max-width: 880px; margin: 0 auto; }
72
+ h1 {
73
+ font-size: 2rem;
74
+ line-height: 2.5rem;
75
+ font-weight: 600;
76
+ margin: 0 0 .5rem;
77
+ }
78
+ .intro { color: var(--muted); margin: 0; word-break: break-word; }
79
+ main {
80
+ max-width: 880px;
81
+ margin: 0 auto;
82
+ padding: 1.5rem 1.5rem 4rem;
83
+ }
84
+ .toolbar {
85
+ display: flex;
86
+ gap: .75rem;
87
+ align-items: center;
88
+ margin-bottom: 1.5rem;
89
+ }
90
+ input[type="search"] {
91
+ flex: 1;
92
+ padding: .55rem .9rem;
93
+ font: inherit;
94
+ font-size: 1rem;
95
+ border: 1px solid var(--border);
96
+ border-radius: var(--radius-input);
97
+ background: var(--card);
98
+ color: var(--fg);
99
+ }
100
+ input[type="search"]:focus {
101
+ outline: none;
102
+ border-color: var(--accent);
103
+ box-shadow: inset 0 0 0 1px var(--accent);
104
+ }
105
+ button.refresh {
106
+ padding: .5rem 1rem;
107
+ font: inherit;
108
+ font-weight: 600;
109
+ font-size: .9rem;
110
+ border: 1px solid var(--border);
111
+ border-radius: var(--radius-input);
112
+ background: var(--card);
113
+ color: var(--fg);
114
+ cursor: pointer;
115
+ box-shadow: var(--card-shadow);
116
+ }
117
+ button.refresh:hover { background: var(--chip-bg); border-color: var(--chip-bg); }
118
+ button.refresh:disabled { opacity: .55; cursor: progress; }
119
+ .refresh-error {
120
+ margin: -.75rem 0 1rem;
121
+ color: var(--error);
122
+ font-size: .85rem;
123
+ }
124
+ section {
125
+ border: 1px solid var(--border);
126
+ border-radius: var(--radius-card);
127
+ margin-bottom: 1rem;
128
+ background: var(--card);
129
+ box-shadow: var(--card-shadow);
130
+ overflow: hidden;
131
+ }
132
+ section[hidden] { display: none; }
133
+ section > h2 {
134
+ font-size: .75rem;
135
+ font-weight: 600;
136
+ text-transform: uppercase;
137
+ letter-spacing: .06em;
138
+ color: var(--muted);
139
+ margin: 0;
140
+ padding: .85rem 1rem;
141
+ background: var(--section-header-bg);
142
+ border-bottom: 1px solid var(--border);
143
+ }
144
+ ul { list-style: none; margin: 0; padding: .5rem 0; }
145
+ li { padding: .4rem 1rem; }
146
+ li[hidden] { display: none; }
147
+ details > summary {
148
+ font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
149
+ font-size: .9rem;
150
+ cursor: pointer;
151
+ list-style: revert;
152
+ }
153
+ details[open] > summary { margin-bottom: .35rem; }
154
+ .endpoints {
155
+ margin: .25rem 0 .25rem 1.1rem;
156
+ padding: 0;
157
+ display: flex;
158
+ flex-wrap: wrap;
159
+ gap: .35rem;
160
+ }
161
+ .endpoints .ep {
162
+ font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
163
+ font-size: .78rem;
164
+ background: var(--chip-bg);
165
+ color: var(--chip-fg);
166
+ padding: .15rem .55rem;
167
+ border-radius: var(--radius-chip);
168
+ }
169
+ .endpoints .none {
170
+ font-size: .8rem;
171
+ color: var(--muted);
172
+ font-style: italic;
173
+ }
174
+ .empty { color: var(--muted); padding: 2rem 0; text-align: center; }
175
+ footer {
176
+ margin-top: 3rem;
177
+ padding-top: 1.5rem;
178
+ border-top: 1px solid var(--border);
179
+ font-size: .8rem;
180
+ color: var(--muted);
181
+ }
182
+ `.trim();
183
+ const SCRIPT = `
184
+ (function () {
185
+ var dataNode = document.getElementById('scopes-data');
186
+ var state = dataNode ? JSON.parse(dataNode.textContent || '[]') : [];
187
+
188
+ var listEl = document.getElementById('scopes-list');
189
+ var searchEl = document.querySelector('input[type="search"]');
190
+ var refreshBtn = document.getElementById('refresh-btn');
191
+ var errorEl = document.getElementById('refresh-error');
192
+ var introCountEl = document.getElementById('scopes-count');
193
+ var labels = JSON.parse(document.getElementById('labels').textContent);
194
+
195
+ function escapeHtml(s) {
196
+ return String(s).replace(/[&<>"']/g, function (c) {
197
+ return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c];
198
+ });
199
+ }
200
+
201
+ function render(entries) {
202
+ if (!entries.length) {
203
+ listEl.innerHTML = '<p class="empty">' + escapeHtml(labels.empty) + '</p>';
204
+ return;
205
+ }
206
+ var byCategory = new Map();
207
+ entries.forEach(function (e) {
208
+ var list = byCategory.get(e.category);
209
+ if (list) list.push(e);
210
+ else byCategory.set(e.category, [e]);
211
+ });
212
+ var html = '';
213
+ byCategory.forEach(function (items, cat) {
214
+ html += '<section><h2>' + escapeHtml(cat) + '</h2><ul>';
215
+ items.forEach(function (e) {
216
+ var endpoints = Array.isArray(e.apiEndpoints) ? e.apiEndpoints : [];
217
+ html += '<li><details><summary>' + escapeHtml(e.name) + '</summary>';
218
+ if (endpoints.length) {
219
+ html += '<div class="endpoints" aria-label="' + escapeHtml(labels.endpointsLabel) + '">';
220
+ endpoints.forEach(function (ep) {
221
+ html += '<span class="ep">' + escapeHtml(ep) + '</span>';
222
+ });
223
+ html += '</div>';
224
+ } else {
225
+ html += '<div class="endpoints"><span class="none">' + escapeHtml(labels.noEndpoints) + '</span></div>';
226
+ }
227
+ html += '</details></li>';
228
+ });
229
+ html += '</ul></section>';
230
+ });
231
+ listEl.innerHTML = html;
232
+ applyFilter();
233
+ }
234
+
235
+ function applyFilter() {
236
+ var q = searchEl ? searchEl.value.toLowerCase().trim() : '';
237
+ var sections = listEl.querySelectorAll('section');
238
+ sections.forEach(function (section) {
239
+ var items = section.querySelectorAll('li');
240
+ var anyVisible = false;
241
+ items.forEach(function (li) {
242
+ var text = li.textContent.toLowerCase();
243
+ var match = q === '' || text.indexOf(q) !== -1;
244
+ li.hidden = !match;
245
+ if (match) anyVisible = true;
246
+ });
247
+ section.hidden = !anyVisible;
248
+ });
249
+ }
250
+
251
+ function setCount(n) {
252
+ if (introCountEl) introCountEl.textContent = String(n);
253
+ }
254
+
255
+ render(state);
256
+ setCount(state.length);
257
+
258
+ if (searchEl) {
259
+ searchEl.addEventListener('input', applyFilter);
260
+ }
261
+
262
+ if (refreshBtn) {
263
+ var defaultLabel = refreshBtn.textContent;
264
+ refreshBtn.addEventListener('click', function () {
265
+ refreshBtn.disabled = true;
266
+ refreshBtn.textContent = labels.refreshing;
267
+ if (errorEl) errorEl.hidden = true;
268
+ fetch('/scopes.json', { headers: { Accept: 'application/json' } })
269
+ .then(function (res) {
270
+ if (!res.ok) throw new Error('HTTP ' + res.status);
271
+ return res.json();
272
+ })
273
+ .then(function (body) {
274
+ var entries = Array.isArray(body && body.scopes) ? body.scopes : [];
275
+ state = entries;
276
+ render(state);
277
+ setCount(state.length);
278
+ })
279
+ .catch(function () {
280
+ if (errorEl) errorEl.hidden = false;
281
+ })
282
+ .then(function () {
283
+ refreshBtn.disabled = false;
284
+ refreshBtn.textContent = defaultLabel;
285
+ });
286
+ });
287
+ }
288
+ })();
289
+ `.trim();
290
+ function renderScopesHtml(entries) {
291
+ const title = escapeHtml(en_1.messages.APP_SCOPES_WEB_TITLE);
292
+ const intro = en_1.messages.APP_SCOPES_WEB_INTRO(entries.length, constants_1.OAUTH_SCOPES_URL);
293
+ // The intro is rendered with a dynamic count span so refresh can update it
294
+ // in place without re-rendering the source URL.
295
+ const introWithSpan = escapeHtml(intro).replace(String(entries.length), `<span id="scopes-count">${entries.length}</span>`);
296
+ const searchPlaceholder = escapeHtml(en_1.messages.APP_SCOPES_WEB_SEARCH_PLACEHOLDER);
297
+ const refreshLabel = escapeHtml(en_1.messages.APP_SCOPES_WEB_REFRESH);
298
+ const refreshError = escapeHtml(en_1.messages.APP_SCOPES_WEB_REFRESH_FAILED);
299
+ const footer = escapeHtml(en_1.messages.APP_SCOPES_WEB_FOOTER);
300
+ const labels = {
301
+ empty: en_1.messages.APP_SCOPES_WEB_EMPTY,
302
+ refreshing: en_1.messages.APP_SCOPES_WEB_REFRESHING,
303
+ endpointsLabel: en_1.messages.APP_SCOPES_WEB_ENDPOINTS_LABEL,
304
+ noEndpoints: en_1.messages.APP_SCOPES_WEB_NO_ENDPOINTS,
305
+ };
306
+ return `<!doctype html>
307
+ <html lang="en">
308
+ <head>
309
+ <meta charset="utf-8">
310
+ <meta name="viewport" content="width=device-width, initial-scale=1">
311
+ <title>${title}</title>
312
+ <style>${STYLES}</style>
313
+ </head>
314
+ <body>
315
+ <header class="hero">
316
+ <div class="hero-inner">
317
+ <h1>${title}</h1>
318
+ <p class="intro">${introWithSpan}</p>
319
+ </div>
320
+ </header>
321
+ <main>
322
+ <div class="toolbar">
323
+ <input type="search" placeholder="${searchPlaceholder}" autofocus>
324
+ <button id="refresh-btn" class="refresh" type="button">${refreshLabel}</button>
325
+ </div>
326
+ <p id="refresh-error" class="refresh-error" hidden>${refreshError}</p>
327
+ <div id="scopes-list"></div>
328
+ <footer>${footer}</footer>
329
+ </main>
330
+ <script type="application/json" id="scopes-data">${safeJson(entries)}</script>
331
+ <script type="application/json" id="labels">${safeJson(labels)}</script>
332
+ <script>${SCRIPT}</script>
333
+ </body>
334
+ </html>
335
+ `;
336
+ }
337
+ //# sourceMappingURL=scopes-html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scopes-html.js","sourceRoot":"","sources":["../../src/services/scopes-html.ts"],"names":[],"mappings":";;AAoSA,4CAmDC;AAvVD,gDAAoD;AACpD,mCAAsC;AAGtC,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK;SACT,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SACxB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC;SACvB,UAAU,CAAC,GAAG,EAA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CAAC,aAAQ,CAAC,sBAAsB,CAAC,CAAC;IACjE,MAAM,YAAY,GAAG,UAAU,CAAC,aAAQ,CAAC,6BAA6B,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,UAAU,CAAC,aAAQ,CAAC,qBAAqB,CAAC,CAAC;IAE1D,MAAM,MAAM,GAAG;QACb,KAAK,EAAE,aAAQ,CAAC,oBAAoB;QACpC,UAAU,EAAE,aAAQ,CAAC,yBAAyB;QAC9C,cAAc,EAAE,aAAQ,CAAC,8BAA8B;QACvD,WAAW,EAAE,aAAQ,CAAC,2BAA2B;KAClD,CAAC;IAEF,OAAO;;;;;SAKA,KAAK;SACL,MAAM;;;;;UAKL,KAAK;uBACQ,aAAa;;;;;wCAKI,iBAAiB;6DACI,YAAY;;uDAElB,YAAY;;YAEvD,MAAM;;mDAEiC,QAAQ,CAAC,OAAO,CAAC;8CACtB,QAAQ,CAAC,MAAM,CAAC;UACpD,MAAM;;;CAGf,CAAC;AACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ScopeEntry } from './oauth-metadata';
2
+ export interface ScopesWebServer {
3
+ url: string;
4
+ close: () => Promise<void>;
5
+ }
6
+ export interface ScopesWebOptions {
7
+ /** Called by GET /scopes.json to re-fetch scopes on demand. Optional —
8
+ * when omitted, the refresh button returns the initial entries unchanged. */
9
+ refetch?: () => Promise<ScopeEntry[]>;
10
+ }
11
+ export declare function startScopesWebServer(initialEntries: ScopeEntry[], options?: ScopesWebOptions): Promise<ScopesWebServer>;
12
+ //# sourceMappingURL=scopes-web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scopes-web.d.ts","sourceRoot":"","sources":["../../src/services/scopes-web.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B;kFAC8E;IAC9E,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;CACvC;AAQD,wBAAgB,oBAAoB,CAClC,cAAc,EAAE,UAAU,EAAE,EAC5B,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAyD1B"}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.startScopesWebServer = startScopesWebServer;
37
+ const http = __importStar(require("node:http"));
38
+ const scopes_html_1 = require("./scopes-html");
39
+ const logger_1 = require("../lib/logger");
40
+ function closeServer(server) {
41
+ return new Promise((resolveClose) => {
42
+ server.close(() => resolveClose());
43
+ });
44
+ }
45
+ function startScopesWebServer(initialEntries, options = {}) {
46
+ const html = (0, scopes_html_1.renderScopesHtml)(initialEntries);
47
+ const refetch = options.refetch;
48
+ return new Promise((resolve, reject) => {
49
+ const server = http.createServer((req, res) => {
50
+ const pathname = new URL(req.url ?? '/', 'http://127.0.0.1').pathname;
51
+ (0, logger_1.logDebug)('scopes-web request', { method: req.method, pathname });
52
+ if (req.method === 'GET' && pathname === '/') {
53
+ res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
54
+ res.end(html);
55
+ return;
56
+ }
57
+ if (req.method === 'GET' && pathname === '/scopes.json') {
58
+ const respond = (entries) => {
59
+ res.writeHead(200, {
60
+ 'Content-Type': 'application/json; charset=utf-8',
61
+ 'Cache-Control': 'no-store',
62
+ });
63
+ res.end(JSON.stringify({ scopes: entries }));
64
+ };
65
+ if (!refetch) {
66
+ respond(initialEntries);
67
+ return;
68
+ }
69
+ refetch()
70
+ .then(respond)
71
+ .catch((err) => {
72
+ (0, logger_1.logDebug)('scopes-web refetch failed', { message: err.message });
73
+ res.writeHead(502, { 'Content-Type': 'application/json; charset=utf-8' });
74
+ res.end(JSON.stringify({ error: 'refetch_failed' }));
75
+ });
76
+ return;
77
+ }
78
+ res.writeHead(404).end();
79
+ });
80
+ server.once('error', (err) => {
81
+ (0, logger_1.logDebug)('scopes-web server error', { message: err.message });
82
+ reject(err);
83
+ });
84
+ server.listen(0, '127.0.0.1', () => {
85
+ const port = server.address().port;
86
+ const url = `http://127.0.0.1:${port}/`;
87
+ (0, logger_1.logDebug)('scopes-web listening', { host: '127.0.0.1', port });
88
+ resolve({
89
+ url,
90
+ close: () => closeServer(server),
91
+ });
92
+ });
93
+ });
94
+ }
95
+ //# sourceMappingURL=scopes-web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scopes-web.js","sourceRoot":"","sources":["../../src/services/scopes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GAAG,oBAAoB,IAAI,GAAG,CAAC;YACxC,IAAA,iBAAQ,EAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;YAC9D,OAAO,CAAC;gBACN,GAAG;gBACH,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC;aACjC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { CLI_VERSION } from '../lib/cli-version';
2
+ export { CLI_VERSION };
1
3
  /**
2
4
  * Catalog of Brevo-authored agent skills installable via `brevo skill:cli install`.
3
5
  *
@@ -32,7 +34,6 @@ export interface SkillEntry {
32
34
  /** Files to copy, relative to `SKILLS_BUNDLE_DIR/<subdir>/`. */
33
35
  files: string[];
34
36
  }
35
- export declare const CLI_VERSION: string;
36
37
  export declare const SKILL_CATALOG: readonly SkillEntry[];
37
38
  /**
38
39
  * Absolute path to the bundled skill source directory. Resolved relative to
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,UAAU;IACzB,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAqBD,eAAO,MAAM,WAAW,QAAmB,CAAC;AAE5C,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EASrC,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,QAAuD,CAAC;AAEtF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAE7D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,UAAU;IACzB,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EASrC,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,QAAuD,CAAC;AAEtF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAE7D"}
@@ -35,33 +35,14 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.SKILLS_BUNDLE_DIR = exports.SKILL_CATALOG = exports.CLI_VERSION = void 0;
37
37
  exports.getSkill = getSkill;
38
- const fs = __importStar(require("node:fs"));
39
38
  const path = __importStar(require("node:path"));
40
- /**
41
- * CLI version pulled from the bundled `package.json` at module-init.
42
- *
43
- * Resolved relative to this file so the same lookup works under ts-jest
44
- * (`src/skills/` → repo root) and the published tarball
45
- * (`node_modules/@getbrevo/cli/dist/skills/` → package root). Falls back to
46
- * `'0.0.0'` if the file is missing or malformed — the auto-refresh pass
47
- * then never fires, which is the safe default.
48
- */
49
- function readCliVersion() {
50
- try {
51
- const pkgPath = path.resolve(__dirname, '..', '..', 'package.json');
52
- const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
53
- return typeof pkg.version === 'string' ? pkg.version : '0.0.0';
54
- }
55
- catch {
56
- return '0.0.0';
57
- }
58
- }
59
- exports.CLI_VERSION = readCliVersion();
39
+ const cli_version_1 = require("../lib/cli-version");
40
+ Object.defineProperty(exports, "CLI_VERSION", { enumerable: true, get: function () { return cli_version_1.CLI_VERSION; } });
60
41
  exports.SKILL_CATALOG = [
61
42
  {
62
43
  name: 'brevo-cli',
63
44
  description: 'Agent primer for the Brevo Developer CLI — decision tree, hard rules, and command map for the `brevo` binary.',
64
- version: exports.CLI_VERSION,
45
+ version: cli_version_1.CLI_VERSION,
65
46
  subdir: '',
66
47
  files: ['SKILL.md'],
67
48
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgFA,4BAEC;AAlFD,4CAA8B;AAC9B,gDAAkC;AAsClC;;;;;;;;GAQG;AACH,SAAS,cAAc;IACrB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAA0B,CAAC;QACnF,OAAO,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IACjE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC;AAEY,QAAA,WAAW,GAAG,cAAc,EAAE,CAAC;AAE/B,QAAA,aAAa,GAA0B;IAClD;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EACT,+GAA+G;QACjH,OAAO,EAAE,mBAAW;QACpB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,CAAC,UAAU,CAAC;KACpB;CACO,CAAC;AAEX;;;;;;GAMG;AACU,QAAA,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;AAEtF,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,qBAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACpD,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA,4BAEC;AA/DD,gDAAkC;AAElC,oDAAiD;AACxC,4FADA,yBAAW,OACA;AAsCP,QAAA,aAAa,GAA0B;IAClD;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EACT,+GAA+G;QACjH,OAAO,EAAE,yBAAW;QACpB,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,CAAC,UAAU,CAAC;KACpB;CACO,CAAC;AAEX;;;;;;GAMG;AACU,QAAA,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;AAEtF,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,qBAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACpD,CAAC"}
@@ -10,7 +10,7 @@ Implements the authorization code flow to obtain access tokens for the Brevo API
10
10
  ## Project structure
11
11
  ```
12
12
  .
13
- ├── app-config.json App metadata (app ID, redirect URIs, scopes)
13
+ ├── app-config.json App metadata (app ID, redirect URIs, scopes, logo URL)
14
14
  ├── .gitignore Ignores .env.local and build artifacts
15
15
  ├── AGENTS.md AI agent guidance (this file)
16
16
  ├── CLAUDE.md Claude Code guidance
@@ -16,7 +16,7 @@ brevo app start oauth # port is read from app-config.json; override with
16
16
  ## Structure
17
17
  ```
18
18
  .
19
- ├── app-config.json App metadata (ID, scopes, redirect URLs)
19
+ ├── app-config.json App metadata (ID, scopes, redirect URLs, logo URL)
20
20
  ├── .gitignore Ignores .env.local and build artifacts
21
21
  ├── AGENTS.md AI agent guidance
22
22
  ├── CLAUDE.md Claude Code guidance (this file)
@@ -26,7 +26,7 @@ Brevo OAuth integration for testing and implementing app authorization flows, sc
26
26
 
27
27
  ```
28
28
  .
29
- ├── app-config.json App config — ID, scopes, redirect URLs
29
+ ├── app-config.json App config — ID, scopes, redirect URLs, logo URL
30
30
  ├── .gitignore Ignores .env.local and build artifacts
31
31
  ├── AGENTS.md AI agent guidance
32
32
  ├── CLAUDE.md Claude Code guidance
@@ -61,6 +61,7 @@ Push changes to Brevo directly from the CLI:
61
61
  brevo app update --name "New Name"
62
62
  brevo app update --redirect-url https://myapp.com/callback
63
63
  brevo app update --name "New Name" --redirect-url https://myapp.com/callback
64
+ brevo app update --logo-uri https://example.com/logo.png
64
65
  ```
65
66
 
66
67
  `--redirect-url` is repeatable and **appends** to existing URLs.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "appId": "{{APP_ID}}",
3
3
  "appName": "{{APP_NAME}}",
4
+ "logoUri": "{{LOGO_URI}}",
4
5
  "cliVersion": "{{CLI_VERSION}}",
5
- "minCliVersion": "{{MIN_CLI_VERSION}}",
6
6
  "auth": {
7
7
  "type": "private",
8
8
  "scopes": {{SCOPES_JSON}},
package/dist/types.d.ts CHANGED
@@ -14,6 +14,7 @@ export interface OAuthApp {
14
14
  public?: boolean;
15
15
  redirect_uris: string[];
16
16
  scopes?: string[];
17
+ logo_uri?: string;
17
18
  created_at: string;
18
19
  updated_at: string;
19
20
  }
@@ -24,6 +25,7 @@ export interface CreateAppResponse {
24
25
  client_secret: string;
25
26
  public?: boolean;
26
27
  redirect_uris: string[];
28
+ logo_uri?: string;
27
29
  created_at: string;
28
30
  updated_at: string;
29
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getbrevo/cli",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "author": "Brevo",
5
5
  "description": "Brevo Developer CLI — create, manage apps and OAuth integrations",
6
6
  "type": "commonjs",
@@ -1,15 +0,0 @@
1
- interface CheckOptions {
2
- currentVersion: string;
3
- argv?: readonly string[];
4
- }
5
- /**
6
- * Warn if the current CLI version is below the project's `minCliVersion`.
7
- * Silent when:
8
- * - cwd has no app-config.json
9
- * - app-config.json has no `minCliVersion`
10
- * - current version is `0.0.0` (unpublished local dev build)
11
- * - `--json` is passed (would corrupt machine-readable output)
12
- */
13
- export declare function warnIfCliBelowMinVersion(opts: CheckOptions): void;
14
- export {};
15
- //# sourceMappingURL=min-version-check.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"min-version-check.d.ts","sourceRoot":"","sources":["../../src/lib/min-version-check.ts"],"names":[],"mappings":"AAKA,UAAU,YAAY;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAMD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAYjE"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.warnIfCliBelowMinVersion = warnIfCliBelowMinVersion;
4
- const config_1 = require("./config");
5
- const update_notifier_1 = require("./update-notifier");
6
- const logger_1 = require("./logger");
7
- const en_1 = require("../lang/en");
8
- function isJsonInvocation(argv) {
9
- return argv.includes('--json');
10
- }
11
- /**
12
- * Warn if the current CLI version is below the project's `minCliVersion`.
13
- * Silent when:
14
- * - cwd has no app-config.json
15
- * - app-config.json has no `minCliVersion`
16
- * - current version is `0.0.0` (unpublished local dev build)
17
- * - `--json` is passed (would corrupt machine-readable output)
18
- */
19
- function warnIfCliBelowMinVersion(opts) {
20
- const argv = opts.argv ?? process.argv;
21
- if (isJsonInvocation(argv))
22
- return;
23
- if (opts.currentVersion === '0.0.0')
24
- return;
25
- const cfg = (0, config_1.readProjectConfig)();
26
- const required = cfg?.minCliVersion;
27
- if (!required)
28
- return;
29
- if ((0, update_notifier_1.isNewer)(opts.currentVersion, required)) {
30
- (0, logger_1.logWarn)(en_1.messages.CLI_BELOW_MIN_VERSION(opts.currentVersion, required));
31
- }
32
- }
33
- //# sourceMappingURL=min-version-check.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"min-version-check.js","sourceRoot":"","sources":["../../src/lib/min-version-check.ts"],"names":[],"mappings":";;AAsBA,4DAYC;AAlCD,qCAA6C;AAC7C,uDAA4C;AAC5C,qCAAmC;AACnC,mCAAsC;AAOtC,SAAS,gBAAgB,CAAC,IAAuB;IAC/C,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CAAC,IAAkB;IACzD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IACvC,IAAI,gBAAgB,CAAC,IAAI,CAAC;QAAE,OAAO;IACnC,IAAI,IAAI,CAAC,cAAc,KAAK,OAAO;QAAE,OAAO;IAE5C,MAAM,GAAG,GAAG,IAAA,0BAAiB,GAAE,CAAC;IAChC,MAAM,QAAQ,GAAG,GAAG,EAAE,aAAa,CAAC;IACpC,IAAI,CAAC,QAAQ;QAAE,OAAO;IAEtB,IAAI,IAAA,yBAAO,EAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC3C,IAAA,gBAAO,EAAC,aAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzE,CAAC;AACH,CAAC"}