@mailmodo/cli 0.0.54-beta.pr56.90 → 0.0.54-beta.pr56.91

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.
@@ -9,5 +9,6 @@ export default class Init extends BaseCommand {
9
9
  };
10
10
  run(): Promise<void>;
11
11
  private persistMonthlyCap;
12
+ private preserveUserFields;
12
13
  private confirmOverwriteIfNeeded;
13
14
  }
@@ -35,7 +35,8 @@ export default class Init extends BaseCommand {
35
35
  async run() {
36
36
  const { flags } = await this.parse(Init);
37
37
  await this.ensureAuth();
38
- if (!(await this.confirmOverwriteIfNeeded(flags)))
38
+ const existing = await loadYaml();
39
+ if (!(await this.confirmOverwriteIfNeeded(flags, existing)))
39
40
  return;
40
41
  let productUrl = flags.url;
41
42
  if (!productUrl) {
@@ -147,6 +148,8 @@ export default class Init extends BaseCommand {
147
148
  webhookUrl: '',
148
149
  },
149
150
  };
151
+ if (existing)
152
+ this.preserveUserFields(yamlConfig, existing);
150
153
  await saveYaml(yamlConfig);
151
154
  await this.persistMonthlyCap(yamlConfig);
152
155
  const templateSaves = analysisPayload.recommendedEmails.flatMap((rec, index) => {
@@ -182,8 +185,26 @@ export default class Init extends BaseCommand {
182
185
  await saveYaml(yamlConfig);
183
186
  }
184
187
  }
185
- async confirmOverwriteIfNeeded(flags) {
186
- const existing = await loadYaml();
188
+ preserveUserFields(config, existing) {
189
+ const p = existing.project;
190
+ if (p.fromEmail)
191
+ config.project.fromEmail = p.fromEmail;
192
+ if (p.replyTo)
193
+ config.project.replyTo = p.replyTo;
194
+ if (p.fromName)
195
+ config.project.fromName = p.fromName;
196
+ if (p.webhookUrl)
197
+ config.project.webhookUrl = p.webhookUrl;
198
+ if (p.emailStyle)
199
+ config.project.emailStyle = p.emailStyle;
200
+ if (p.domain)
201
+ config.project.domain = p.domain;
202
+ if (p.address)
203
+ config.project.address = p.address;
204
+ if (p.logoFile)
205
+ config.project.logoFile = p.logoFile;
206
+ }
207
+ async confirmOverwriteIfNeeded(flags, existing) {
187
208
  if (!existing)
188
209
  return true;
189
210
  if (flags.yes)
@@ -76,15 +76,15 @@
76
76
  "index.js"
77
77
  ]
78
78
  },
79
- "deploy": {
79
+ "contacts": {
80
80
  "aliases": [],
81
81
  "args": {},
82
- "description": "Deploy, pause, or resume an email sequence",
82
+ "description": "Manage contacts — search, export, or delete",
83
83
  "examples": [
84
- "<%= config.bin %> deploy",
85
- "<%= config.bin %> deploy --yes",
86
- "<%= config.bin %> deploy --pause seq_abc123",
87
- "<%= config.bin %> deploy --resume seq_abc123 --json"
84
+ "<%= config.bin %> contacts",
85
+ "<%= config.bin %> contacts --search sarah@example.com",
86
+ "<%= config.bin %> contacts --export # GDPR CSV → contacts.csv",
87
+ "<%= config.bin %> contacts --delete sarah@example.com"
88
88
  ],
89
89
  "flags": {
90
90
  "json": {
@@ -100,22 +100,22 @@
100
100
  "allowNo": false,
101
101
  "type": "boolean"
102
102
  },
103
- "pause": {
104
- "description": "Pause a deployed sequence by ID (stops scheduled + triggered sends)",
105
- "exclusive": [
106
- "resume"
107
- ],
108
- "name": "pause",
103
+ "delete": {
104
+ "description": "GDPR hard delete a contact by email",
105
+ "name": "delete",
109
106
  "hasDynamicHelp": false,
110
107
  "multiple": false,
111
108
  "type": "option"
112
109
  },
113
- "resume": {
114
- "description": "Resume a paused sequence by ID",
115
- "exclusive": [
116
- "pause"
117
- ],
118
- "name": "resume",
110
+ "export": {
111
+ "description": "Export all contacts as GDPR-compliant CSV (writes contacts.csv in the current directory)",
112
+ "name": "export",
113
+ "allowNo": false,
114
+ "type": "boolean"
115
+ },
116
+ "search": {
117
+ "description": "Search for a contact by email",
118
+ "name": "search",
119
119
  "hasDynamicHelp": false,
120
120
  "multiple": false,
121
121
  "type": "option"
@@ -123,7 +123,7 @@
123
123
  },
124
124
  "hasDynamicHelp": false,
125
125
  "hiddenAliases": [],
126
- "id": "deploy",
126
+ "id": "contacts",
127
127
  "pluginAlias": "@mailmodo/cli",
128
128
  "pluginName": "@mailmodo/cli",
129
129
  "pluginType": "core",
@@ -133,17 +133,19 @@
133
133
  "relativePath": [
134
134
  "dist",
135
135
  "commands",
136
- "deploy",
136
+ "contacts",
137
137
  "index.js"
138
138
  ]
139
139
  },
140
- "deployments": {
140
+ "deploy": {
141
141
  "aliases": [],
142
142
  "args": {},
143
- "description": "List every deployed sequence on this account, with the IDs needed for deploy --pause / --resume",
143
+ "description": "Deploy, pause, or resume an email sequence",
144
144
  "examples": [
145
- "<%= config.bin %> deployments",
146
- "<%= config.bin %> deployments --json"
145
+ "<%= config.bin %> deploy",
146
+ "<%= config.bin %> deploy --yes",
147
+ "<%= config.bin %> deploy --pause seq_abc123",
148
+ "<%= config.bin %> deploy --resume seq_abc123 --json"
147
149
  ],
148
150
  "flags": {
149
151
  "json": {
@@ -158,11 +160,31 @@
158
160
  "name": "yes",
159
161
  "allowNo": false,
160
162
  "type": "boolean"
163
+ },
164
+ "pause": {
165
+ "description": "Pause a deployed sequence by ID (stops scheduled + triggered sends)",
166
+ "exclusive": [
167
+ "resume"
168
+ ],
169
+ "name": "pause",
170
+ "hasDynamicHelp": false,
171
+ "multiple": false,
172
+ "type": "option"
173
+ },
174
+ "resume": {
175
+ "description": "Resume a paused sequence by ID",
176
+ "exclusive": [
177
+ "pause"
178
+ ],
179
+ "name": "resume",
180
+ "hasDynamicHelp": false,
181
+ "multiple": false,
182
+ "type": "option"
161
183
  }
162
184
  },
163
185
  "hasDynamicHelp": false,
164
186
  "hiddenAliases": [],
165
- "id": "deployments",
187
+ "id": "deploy",
166
188
  "pluginAlias": "@mailmodo/cli",
167
189
  "pluginName": "@mailmodo/cli",
168
190
  "pluginType": "core",
@@ -172,19 +194,17 @@
172
194
  "relativePath": [
173
195
  "dist",
174
196
  "commands",
175
- "deployments",
197
+ "deploy",
176
198
  "index.js"
177
199
  ]
178
200
  },
179
- "contacts": {
201
+ "deployments": {
180
202
  "aliases": [],
181
203
  "args": {},
182
- "description": "Manage contacts search, export, or delete",
204
+ "description": "List every deployed sequence on this account, with the IDs needed for deploy --pause / --resume",
183
205
  "examples": [
184
- "<%= config.bin %> contacts",
185
- "<%= config.bin %> contacts --search sarah@example.com",
186
- "<%= config.bin %> contacts --export # GDPR CSV → contacts.csv",
187
- "<%= config.bin %> contacts --delete sarah@example.com"
206
+ "<%= config.bin %> deployments",
207
+ "<%= config.bin %> deployments --json"
188
208
  ],
189
209
  "flags": {
190
210
  "json": {
@@ -199,31 +219,11 @@
199
219
  "name": "yes",
200
220
  "allowNo": false,
201
221
  "type": "boolean"
202
- },
203
- "delete": {
204
- "description": "GDPR hard delete a contact by email",
205
- "name": "delete",
206
- "hasDynamicHelp": false,
207
- "multiple": false,
208
- "type": "option"
209
- },
210
- "export": {
211
- "description": "Export all contacts as GDPR-compliant CSV (writes contacts.csv in the current directory)",
212
- "name": "export",
213
- "allowNo": false,
214
- "type": "boolean"
215
- },
216
- "search": {
217
- "description": "Search for a contact by email",
218
- "name": "search",
219
- "hasDynamicHelp": false,
220
- "multiple": false,
221
- "type": "option"
222
222
  }
223
223
  },
224
224
  "hasDynamicHelp": false,
225
225
  "hiddenAliases": [],
226
- "id": "contacts",
226
+ "id": "deployments",
227
227
  "pluginAlias": "@mailmodo/cli",
228
228
  "pluginName": "@mailmodo/cli",
229
229
  "pluginType": "core",
@@ -233,7 +233,7 @@
233
233
  "relativePath": [
234
234
  "dist",
235
235
  "commands",
236
- "contacts",
236
+ "deployments",
237
237
  "index.js"
238
238
  ]
239
239
  },
@@ -631,14 +631,13 @@
631
631
  "index.js"
632
632
  ]
633
633
  },
634
- "sdk": {
634
+ "status": {
635
635
  "aliases": [],
636
636
  "args": {},
637
- "description": "Show the SDK track() / identify() reference for deployed sequences",
637
+ "description": "View email performance metrics and quota usage",
638
638
  "examples": [
639
- "<%= config.bin %> sdk",
640
- "<%= config.bin %> sdk --sequence-id a1b2c3d4",
641
- "<%= config.bin %> sdk --json"
639
+ "<%= config.bin %> status",
640
+ "<%= config.bin %> status --json"
642
641
  ],
643
642
  "flags": {
644
643
  "json": {
@@ -653,18 +652,11 @@
653
652
  "name": "yes",
654
653
  "allowNo": false,
655
654
  "type": "boolean"
656
- },
657
- "sequence-id": {
658
- "description": "Limit output to a single active sequence by ID (default: all active sequences)",
659
- "name": "sequence-id",
660
- "hasDynamicHelp": false,
661
- "multiple": false,
662
- "type": "option"
663
655
  }
664
656
  },
665
657
  "hasDynamicHelp": false,
666
658
  "hiddenAliases": [],
667
- "id": "sdk",
659
+ "id": "status",
668
660
  "pluginAlias": "@mailmodo/cli",
669
661
  "pluginName": "@mailmodo/cli",
670
662
  "pluginType": "core",
@@ -674,7 +666,7 @@
674
666
  "relativePath": [
675
667
  "dist",
676
668
  "commands",
677
- "sdk",
669
+ "status",
678
670
  "index.js"
679
671
  ]
680
672
  },
@@ -725,13 +717,14 @@
725
717
  "index.js"
726
718
  ]
727
719
  },
728
- "status": {
720
+ "sdk": {
729
721
  "aliases": [],
730
722
  "args": {},
731
- "description": "View email performance metrics and quota usage",
723
+ "description": "Show the SDK track() / identify() reference for deployed sequences",
732
724
  "examples": [
733
- "<%= config.bin %> status",
734
- "<%= config.bin %> status --json"
725
+ "<%= config.bin %> sdk",
726
+ "<%= config.bin %> sdk --sequence-id a1b2c3d4",
727
+ "<%= config.bin %> sdk --json"
735
728
  ],
736
729
  "flags": {
737
730
  "json": {
@@ -746,11 +739,18 @@
746
739
  "name": "yes",
747
740
  "allowNo": false,
748
741
  "type": "boolean"
742
+ },
743
+ "sequence-id": {
744
+ "description": "Limit output to a single active sequence by ID (default: all active sequences)",
745
+ "name": "sequence-id",
746
+ "hasDynamicHelp": false,
747
+ "multiple": false,
748
+ "type": "option"
749
749
  }
750
750
  },
751
751
  "hasDynamicHelp": false,
752
752
  "hiddenAliases": [],
753
- "id": "status",
753
+ "id": "sdk",
754
754
  "pluginAlias": "@mailmodo/cli",
755
755
  "pluginName": "@mailmodo/cli",
756
756
  "pluginType": "core",
@@ -760,10 +760,10 @@
760
760
  "relativePath": [
761
761
  "dist",
762
762
  "commands",
763
- "status",
763
+ "sdk",
764
764
  "index.js"
765
765
  ]
766
766
  }
767
767
  },
768
- "version": "0.0.54-beta.pr56.90"
768
+ "version": "0.0.54-beta.pr56.91"
769
769
  }
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.54-beta.pr56.90",
4
+ "version": "0.0.54-beta.pr56.91",
5
5
  "author": "provishalk",
6
6
  "bin": {
7
7
  "mailmodo": "bin/run.js"