@myapihq/cli 1.0.67 → 1.0.68

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.
@@ -19,8 +19,10 @@ export async function checkForUpdate(currentVersion) {
19
19
  if (latest && isNewer(latest, currentVersion)) {
20
20
  info(`\n› New version available (${currentVersion} → ${latest}) — installing…`);
21
21
  try {
22
- // Pin the exact version so npm can't resolve to a cached older one.
23
- execSync(`"${npmBin()}" install -g @myapihq/cli@${latest}`, { stdio: 'pipe' });
22
+ // Use @latest so npm only resolves to a fully-published tarball, avoiding
23
+ // ETARGET races where registry metadata briefly reports a version before
24
+ // its tarball is available.
25
+ execSync(`"${npmBin()}" install -g @myapihq/cli@latest`, { stdio: 'pipe' });
24
26
  const config = loadConfig();
25
27
  if (config?.skills_installed) {
26
28
  await installSkills();
@@ -29,11 +31,8 @@ export async function checkForUpdate(currentVersion) {
29
31
  }
30
32
  catch (installErr) {
31
33
  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;
35
34
  info(`› Auto-update failed: ${msg.trim()}`);
36
- info(`› Run manually: npm install -g @myapihq/cli@${latest}`);
35
+ info(`› Run manually: npm install -g @myapihq/cli@latest`);
37
36
  }
38
37
  }
39
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myapihq/cli",
3
- "version": "1.0.67",
3
+ "version": "1.0.68",
4
4
  "description": "MyAPI command-line interface",
5
5
  "type": "module",
6
6
  "files": [