@myapihq/cli 1.0.65 → 1.0.67

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.
@@ -177,10 +177,13 @@ export async function switchCmd(flags = {}, indexArg) {
177
177
  if (byEmail) {
178
178
  idx = byEmail.index;
179
179
  }
180
+ else if (idxStr.includes('@')) {
181
+ error(`No account found with email "${idxStr}". Run "myapi auth switch" to list configured accounts.`);
182
+ }
180
183
  else {
181
184
  idx = parseInt(idxStr, 10) - 1;
182
185
  if (isNaN(idx) || idx < 0 || idx >= accounts.length) {
183
- error('Invalid selection. Use an index number or email address.');
186
+ error(`Invalid selection "${idxStr}". Use an index number (1-${accounts.length}) or an email address.`);
184
187
  }
185
188
  }
186
189
  if (switchAccount(idx)) {
@@ -29,6 +29,9 @@ export async function checkForUpdate(currentVersion) {
29
29
  }
30
30
  catch (installErr) {
31
31
  const msg = installErr?.stderr?.toString?.() || installErr?.message || String(installErr);
32
+ // Silently ignore ETARGET — version just published, tarball not yet available.
33
+ if (msg.includes('ETARGET') || msg.includes('notarget'))
34
+ return;
32
35
  info(`› Auto-update failed: ${msg.trim()}`);
33
36
  info(`› Run manually: npm install -g @myapihq/cli@${latest}`);
34
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myapihq/cli",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "description": "MyAPI command-line interface",
5
5
  "type": "module",
6
6
  "files": [