viza 1.7.36 → 1.7.39

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.
@@ -126,20 +126,9 @@ export async function dispatchIntentAndWait(input, opts = {}) {
126
126
  };
127
127
  showDispatchBanner(input, meta, opts.status);
128
128
  const spinner = startSpinner("Waiting for dispatch session");
129
+ // Start update check in parallel (do not block dispatch)
130
+ const updateCheck = checkForCliUpdateSoft().catch(() => null);
129
131
  const handle = await dispatchIntent(input, mode);
130
- // Non-blocking update check (utility only)
131
- void checkForCliUpdateSoft()
132
- .then((updateInfo) => {
133
- if (!updateInfo?.hasUpdate)
134
- return;
135
- const title = chalk.gray.bold("\n⬆️ Update available");
136
- const ver = chalk.yellow(`${updateInfo.current} → ${updateInfo.latest}`);
137
- const cmd = chalk.cyan("npm i -g viza");
138
- console.log(`\n${title} ${ver}\n${chalk.dim(" Run:")} ${cmd}\n`);
139
- })
140
- .catch(() => {
141
- // best-effort only — never affect dispatch flow
142
- });
143
132
  try {
144
133
  const result = await handle.wait();
145
134
  stopSpinner(spinner, result.status === "success" ? "✅ Done" : "❌ Failed");
@@ -147,6 +136,14 @@ export async function dispatchIntentAndWait(input, opts = {}) {
147
136
  if (result.status !== "success") {
148
137
  throw new Error(`Dispatch failed: ${result.status}`);
149
138
  }
139
+ // Render update hint if available (spinner already stopped)
140
+ const updateInfo = await updateCheck;
141
+ if (updateInfo?.hasUpdate) {
142
+ const title = chalk.gray.bold("\n⬆️ Update available");
143
+ const ver = chalk.yellow(`${updateInfo.current} → ${updateInfo.latest}`);
144
+ const cmd = chalk.cyan("npm i -g viza");
145
+ console.log(`\n${title} ${ver}\n${chalk.dim(" Run:")} ${cmd}\n`);
146
+ }
150
147
  return result;
151
148
  }
152
149
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viza",
3
- "version": "1.7.36",
3
+ "version": "1.7.39",
4
4
  "type": "module",
5
5
  "description": "Viza unified command line interface",
6
6
  "bin": {