@mailmodo/cli 0.0.24 → 0.0.25-beta.pr27.42

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.
@@ -200,12 +200,23 @@ export default class Deploy extends BaseCommand {
200
200
  this.log(` ${'─'.repeat(53)}\n`);
201
201
  this.log(` ${chalk.cyan(sdkSnippet.install ?? 'npm install @mailmodo/sdk')}\n`);
202
202
  this.log(` ${chalk.dim("import { track, identify } from '@mailmodo/sdk'")}\n`);
203
- for (const [key, snippet] of Object.entries(sdkSnippet)) {
204
- if (key === 'install')
205
- continue;
206
- this.log(` ${chalk.dim(snippet)}`);
203
+ if (sdkSnippet.examples) {
204
+ this.log(` ${chalk.dim('// Example usage:')}`);
205
+ this.log(` ${chalk.dim(sdkSnippet.examples.track)}`);
206
+ this.log(` ${chalk.dim(sdkSnippet.examples.identify)}\n`);
207
207
  }
208
- this.log('');
208
+ const trackCalls = [...new Set(sdkSnippet.trackCalls ?? [])];
209
+ for (const call of trackCalls) {
210
+ this.log(` ${chalk.dim(call)}`);
211
+ }
212
+ if (trackCalls.length > 0)
213
+ this.log('');
214
+ const identifyCalls = [...new Set(sdkSnippet.identifyCalls ?? [])];
215
+ for (const call of identifyCalls) {
216
+ this.log(` ${chalk.dim(call)}`);
217
+ }
218
+ if (identifyCalls.length > 0)
219
+ this.log('');
209
220
  this.log(` Full SDK docs: ${chalk.cyan('mailmodo.com/docs/sdk')}\n`);
210
221
  this.log(` ${'─'.repeat(53)}\n`);
211
222
  }
@@ -225,10 +225,11 @@ export default class Preview extends BaseCommand {
225
225
  }
226
226
  await new Promise((resolve) => {
227
227
  const shutdown = () => {
228
+ server.closeAllConnections?.();
228
229
  server.close(() => resolve());
229
230
  };
230
- process.on('SIGINT', shutdown);
231
- process.on('SIGTERM', shutdown);
231
+ process.once('SIGINT', shutdown);
232
+ process.once('SIGTERM', shutdown);
232
233
  });
233
234
  }
234
235
  }
@@ -205,19 +205,13 @@
205
205
  "index.js"
206
206
  ]
207
207
  },
208
- "edit": {
208
+ "emails": {
209
209
  "aliases": [],
210
- "args": {
211
- "id": {
212
- "description": "Email template ID to edit",
213
- "name": "id",
214
- "required": true
215
- }
216
- },
217
- "description": "Edit an email using AI-assisted natural language changes",
210
+ "args": {},
211
+ "description": "List and view configured email sequences",
218
212
  "examples": [
219
- "<%= config.bin %> edit welcome",
220
- "<%= config.bin %> edit welcome --change \"make subject more urgent\" --yes"
213
+ "<%= config.bin %> emails",
214
+ "<%= config.bin %> emails --json"
221
215
  ],
222
216
  "flags": {
223
217
  "json": {
@@ -232,18 +226,11 @@
232
226
  "name": "yes",
233
227
  "allowNo": false,
234
228
  "type": "boolean"
235
- },
236
- "change": {
237
- "description": "Natural language description of the change",
238
- "name": "change",
239
- "hasDynamicHelp": false,
240
- "multiple": false,
241
- "type": "option"
242
229
  }
243
230
  },
244
231
  "hasDynamicHelp": false,
245
232
  "hiddenAliases": [],
246
- "id": "edit",
233
+ "id": "emails",
247
234
  "pluginAlias": "@mailmodo/cli",
248
235
  "pluginName": "@mailmodo/cli",
249
236
  "pluginType": "core",
@@ -253,17 +240,17 @@
253
240
  "relativePath": [
254
241
  "dist",
255
242
  "commands",
256
- "edit",
243
+ "emails",
257
244
  "index.js"
258
245
  ]
259
246
  },
260
- "emails": {
247
+ "init": {
261
248
  "aliases": [],
262
249
  "args": {},
263
- "description": "List and view configured email sequences",
250
+ "description": "Analyze your product and generate email sequences",
264
251
  "examples": [
265
- "<%= config.bin %> emails",
266
- "<%= config.bin %> emails --json"
252
+ "<%= config.bin %> init",
253
+ "<%= config.bin %> init --url https://myapp.com --yes"
267
254
  ],
268
255
  "flags": {
269
256
  "json": {
@@ -278,11 +265,18 @@
278
265
  "name": "yes",
279
266
  "allowNo": false,
280
267
  "type": "boolean"
268
+ },
269
+ "url": {
270
+ "description": "Product URL to analyze",
271
+ "name": "url",
272
+ "hasDynamicHelp": false,
273
+ "multiple": false,
274
+ "type": "option"
281
275
  }
282
276
  },
283
277
  "hasDynamicHelp": false,
284
278
  "hiddenAliases": [],
285
- "id": "emails",
279
+ "id": "init",
286
280
  "pluginAlias": "@mailmodo/cli",
287
281
  "pluginName": "@mailmodo/cli",
288
282
  "pluginType": "core",
@@ -292,17 +286,17 @@
292
286
  "relativePath": [
293
287
  "dist",
294
288
  "commands",
295
- "emails",
289
+ "init",
296
290
  "index.js"
297
291
  ]
298
292
  },
299
- "init": {
293
+ "login": {
300
294
  "aliases": [],
301
295
  "args": {},
302
- "description": "Analyze your product and generate email sequences",
296
+ "description": "Authenticate with Mailmodo using your API key",
303
297
  "examples": [
304
- "<%= config.bin %> init",
305
- "<%= config.bin %> init --url https://myapp.com --yes"
298
+ "<%= config.bin %> login",
299
+ "MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login"
306
300
  ],
307
301
  "flags": {
308
302
  "json": {
@@ -317,18 +311,11 @@
317
311
  "name": "yes",
318
312
  "allowNo": false,
319
313
  "type": "boolean"
320
- },
321
- "url": {
322
- "description": "Product URL to analyze",
323
- "name": "url",
324
- "hasDynamicHelp": false,
325
- "multiple": false,
326
- "type": "option"
327
314
  }
328
315
  },
329
316
  "hasDynamicHelp": false,
330
317
  "hiddenAliases": [],
331
- "id": "init",
318
+ "id": "login",
332
319
  "pluginAlias": "@mailmodo/cli",
333
320
  "pluginName": "@mailmodo/cli",
334
321
  "pluginType": "core",
@@ -338,17 +325,16 @@
338
325
  "relativePath": [
339
326
  "dist",
340
327
  "commands",
341
- "init",
328
+ "login",
342
329
  "index.js"
343
330
  ]
344
331
  },
345
- "login": {
332
+ "logout": {
346
333
  "aliases": [],
347
334
  "args": {},
348
- "description": "Authenticate with Mailmodo using your API key",
335
+ "description": "Sign out by removing saved credentials from this machine",
349
336
  "examples": [
350
- "<%= config.bin %> login",
351
- "MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login"
337
+ "<%= config.bin %> logout"
352
338
  ],
353
339
  "flags": {
354
340
  "json": {
@@ -367,7 +353,7 @@
367
353
  },
368
354
  "hasDynamicHelp": false,
369
355
  "hiddenAliases": [],
370
- "id": "login",
356
+ "id": "logout",
371
357
  "pluginAlias": "@mailmodo/cli",
372
358
  "pluginName": "@mailmodo/cli",
373
359
  "pluginType": "core",
@@ -377,7 +363,7 @@
377
363
  "relativePath": [
378
364
  "dist",
379
365
  "commands",
380
- "login",
366
+ "logout",
381
367
  "index.js"
382
368
  ]
383
369
  },
@@ -451,12 +437,19 @@
451
437
  "index.js"
452
438
  ]
453
439
  },
454
- "logout": {
440
+ "edit": {
455
441
  "aliases": [],
456
- "args": {},
457
- "description": "Sign out by removing saved credentials from this machine",
442
+ "args": {
443
+ "id": {
444
+ "description": "Email template ID to edit",
445
+ "name": "id",
446
+ "required": true
447
+ }
448
+ },
449
+ "description": "Edit an email using AI-assisted natural language changes",
458
450
  "examples": [
459
- "<%= config.bin %> logout"
451
+ "<%= config.bin %> edit welcome",
452
+ "<%= config.bin %> edit welcome --change \"make subject more urgent\" --yes"
460
453
  ],
461
454
  "flags": {
462
455
  "json": {
@@ -471,11 +464,18 @@
471
464
  "name": "yes",
472
465
  "allowNo": false,
473
466
  "type": "boolean"
467
+ },
468
+ "change": {
469
+ "description": "Natural language description of the change",
470
+ "name": "change",
471
+ "hasDynamicHelp": false,
472
+ "multiple": false,
473
+ "type": "option"
474
474
  }
475
475
  },
476
476
  "hasDynamicHelp": false,
477
477
  "hiddenAliases": [],
478
- "id": "logout",
478
+ "id": "edit",
479
479
  "pluginAlias": "@mailmodo/cli",
480
480
  "pluginName": "@mailmodo/cli",
481
481
  "pluginType": "core",
@@ -485,18 +485,23 @@
485
485
  "relativePath": [
486
486
  "dist",
487
487
  "commands",
488
- "logout",
488
+ "edit",
489
489
  "index.js"
490
490
  ]
491
491
  },
492
- "settings": {
492
+ "preview": {
493
493
  "aliases": [],
494
- "args": {},
495
- "description": "View and update project settings",
494
+ "args": {
495
+ "id": {
496
+ "description": "Email template ID to preview",
497
+ "name": "id"
498
+ }
499
+ },
500
+ "description": "Preview an email in browser, as text, or send a test",
496
501
  "examples": [
497
- "<%= config.bin %> settings",
498
- "<%= config.bin %> settings --set brand_color=#0F3460",
499
- "<%= config.bin %> settings --json"
502
+ "<%= config.bin %> preview welcome",
503
+ "<%= config.bin %> preview welcome --text",
504
+ "<%= config.bin %> preview welcome --send me@example.com"
500
505
  ],
501
506
  "flags": {
502
507
  "json": {
@@ -512,17 +517,23 @@
512
517
  "allowNo": false,
513
518
  "type": "boolean"
514
519
  },
515
- "set": {
516
- "description": "Set a setting (format: key=value)",
517
- "name": "set",
520
+ "send": {
521
+ "description": "Send test email to this address",
522
+ "name": "send",
518
523
  "hasDynamicHelp": false,
519
524
  "multiple": false,
520
525
  "type": "option"
526
+ },
527
+ "text": {
528
+ "description": "Output plain text version (for AI agents)",
529
+ "name": "text",
530
+ "allowNo": false,
531
+ "type": "boolean"
521
532
  }
522
533
  },
523
534
  "hasDynamicHelp": false,
524
535
  "hiddenAliases": [],
525
- "id": "settings",
536
+ "id": "preview",
526
537
  "pluginAlias": "@mailmodo/cli",
527
538
  "pluginName": "@mailmodo/cli",
528
539
  "pluginType": "core",
@@ -532,17 +543,18 @@
532
543
  "relativePath": [
533
544
  "dist",
534
545
  "commands",
535
- "settings",
546
+ "preview",
536
547
  "index.js"
537
548
  ]
538
549
  },
539
- "status": {
550
+ "settings": {
540
551
  "aliases": [],
541
552
  "args": {},
542
- "description": "View email performance metrics and quota usage",
553
+ "description": "View and update project settings",
543
554
  "examples": [
544
- "<%= config.bin %> status",
545
- "<%= config.bin %> status --json"
555
+ "<%= config.bin %> settings",
556
+ "<%= config.bin %> settings --set brand_color=#0F3460",
557
+ "<%= config.bin %> settings --json"
546
558
  ],
547
559
  "flags": {
548
560
  "json": {
@@ -557,11 +569,18 @@
557
569
  "name": "yes",
558
570
  "allowNo": false,
559
571
  "type": "boolean"
572
+ },
573
+ "set": {
574
+ "description": "Set a setting (format: key=value)",
575
+ "name": "set",
576
+ "hasDynamicHelp": false,
577
+ "multiple": false,
578
+ "type": "option"
560
579
  }
561
580
  },
562
581
  "hasDynamicHelp": false,
563
582
  "hiddenAliases": [],
564
- "id": "status",
583
+ "id": "settings",
565
584
  "pluginAlias": "@mailmodo/cli",
566
585
  "pluginName": "@mailmodo/cli",
567
586
  "pluginType": "core",
@@ -571,23 +590,17 @@
571
590
  "relativePath": [
572
591
  "dist",
573
592
  "commands",
574
- "status",
593
+ "settings",
575
594
  "index.js"
576
595
  ]
577
596
  },
578
- "preview": {
597
+ "status": {
579
598
  "aliases": [],
580
- "args": {
581
- "id": {
582
- "description": "Email template ID to preview",
583
- "name": "id"
584
- }
585
- },
586
- "description": "Preview an email in browser, as text, or send a test",
599
+ "args": {},
600
+ "description": "View email performance metrics and quota usage",
587
601
  "examples": [
588
- "<%= config.bin %> preview welcome",
589
- "<%= config.bin %> preview welcome --text",
590
- "<%= config.bin %> preview welcome --send me@example.com"
602
+ "<%= config.bin %> status",
603
+ "<%= config.bin %> status --json"
591
604
  ],
592
605
  "flags": {
593
606
  "json": {
@@ -602,24 +615,11 @@
602
615
  "name": "yes",
603
616
  "allowNo": false,
604
617
  "type": "boolean"
605
- },
606
- "send": {
607
- "description": "Send test email to this address",
608
- "name": "send",
609
- "hasDynamicHelp": false,
610
- "multiple": false,
611
- "type": "option"
612
- },
613
- "text": {
614
- "description": "Output plain text version (for AI agents)",
615
- "name": "text",
616
- "allowNo": false,
617
- "type": "boolean"
618
618
  }
619
619
  },
620
620
  "hasDynamicHelp": false,
621
621
  "hiddenAliases": [],
622
- "id": "preview",
622
+ "id": "status",
623
623
  "pluginAlias": "@mailmodo/cli",
624
624
  "pluginName": "@mailmodo/cli",
625
625
  "pluginType": "core",
@@ -629,10 +629,10 @@
629
629
  "relativePath": [
630
630
  "dist",
631
631
  "commands",
632
- "preview",
632
+ "status",
633
633
  "index.js"
634
634
  ]
635
635
  }
636
636
  },
637
- "version": "0.0.24"
637
+ "version": "0.0.25-beta.pr27.42"
638
638
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mailmodo/cli",
3
3
  "description": "Email lifecycle automation for the AI-native builder generation.",
4
- "version": "0.0.24",
4
+ "version": "0.0.25-beta.pr27.42",
5
5
  "author": "provishalk",
6
6
  "bin": {
7
7
  "mailmodo": "bin/run.js"