@vibeapi/api-helper 0.0.145 → 0.0.146
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.
package/dist/lib/post-apply.d.ts
CHANGED
|
@@ -7,10 +7,11 @@ export declare function runPendingElevations(tools: string[]): Promise<void>;
|
|
|
7
7
|
* What setup and the wizard ask right after writing configs: UAC changes and
|
|
8
8
|
* adapter follow-ups (non-interactive: only their hint), then upgrade tools too
|
|
9
9
|
* old for the config (`vibecli upgrade`) and restart GUI apps that are running and
|
|
10
|
-
* would otherwise keep the old config. Both are asked in a terminal
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* would otherwise keep the old config. Both are asked in a terminal. The upgrade:
|
|
11
|
+
* `--yes` does it without asking (10-31: the question stopped `irm … | iex` runs
|
|
12
|
+
* given `--yes` on Windows); without `--yes` and without a terminal it is skipped
|
|
13
|
+
* (its hint is already printed). A running app is only restarted when someone at a
|
|
14
|
+
* terminal says yes: with `--yes` or without a terminal it is left running and the
|
|
15
|
+
* last line says to reopen it (user, 10-31: a script must not close someone's app).
|
|
15
16
|
*/
|
|
16
17
|
export declare function postApplyPrompts(tools: string[]): Promise<void>;
|
package/dist/lib/post-apply.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"chalk";import t from"inquirer";import{i18n as n}from"./i18n.js";import{canPrompt as e,hasExplicitYes as i,shouldAutoConfirm as r}from"./runtime-options.js";import{toolManager as
|
|
1
|
+
import o from"chalk";import t from"inquirer";import{i18n as n}from"./i18n.js";import{canPrompt as e,hasExplicitYes as i,shouldAutoConfirm as r}from"./runtime-options.js";import{toolManager as l}from"./tool-manager.js";import{getAdapter as s}from"./tools/registry.js";import{upgradeTool as a}from"./tool-upgrade.js";import{logger as p}from"../utils/logger.js";async function f(o){const{ok:n}=await t.prompt([{type:"confirm",name:"ok",message:o,default:!0}]);return n}export async function runPendingElevations(t){const i=e();for(const e of t){const t=s(e)?.pendingElevation?.();if(!t)continue;if(!(r()||i&&await f(t.prompt)))continue;const l=s(e)?.displayName??e;console.log(o.gray(" "+n.t("setup.elevation_running"))),console.log(t.run()?o.green(" √ "+n.t("setup.elevation_done",{tool:l})):o.yellow(" ! "+n.t("setup.elevation_failed",{tool:l})))}}export async function postApplyPrompts(t){for(const n of t){const t=await(s(n)?.prepareRuntime?.())??[];for(const n of t)console.log("action"===n.kind?o.yellow(" ! "+n.text):o.green(" √ "+n.text))}await runPendingElevations(t);const r=e();for(const n of t){let t;try{t=await(s(n)?.followUp?.())}catch(o){p.logError(`postApplyPrompts.followUp(${n})`,o);continue}if(t)if("run"in t&&(i()||r))if(i()||await f(t.prompt))for(const n of await t.run())console.log("action"===n.kind?o.yellow(" ! "+n.text):o.green(" √ "+n.text));else t.decline();else console.log(o.yellow(" ! "+t.hint))}const c=i(),u=r||c?t.filter(o=>s(o)?.installSpec&&l.outdatedVersion(o)):[];if(u.length>0){const o=u.map(o=>s(o)?.displayName??o).join("、");if(c||await f(n.t("setup.offer_upgrade",{tools:o})))for(const o of u)await a(o)}for(const e of t){const t=s(e);if(!t?.runningApp?.isRunning())continue;if(c||!r){console.log(o.yellow(" ! "+n.t("setup.reopen_hint",{tool:t.displayName})));continue}if(!await f(n.t("setup.offer_restart",{tool:t.displayName})))continue;const i=t.runningApp.restart();console.log(i?o.green(" √ "+n.t("setup.restarted",{tool:t.displayName})):o.yellow(" ! "+n.t("setup.restart_failed",{tool:t.displayName})))}}
|
package/dist/locales/en_US.json
CHANGED
|
@@ -345,6 +345,7 @@
|
|
|
345
345
|
"failed_summary": "{{count}} tool(s) not configured; see above",
|
|
346
346
|
"offer_upgrade": "Upgrade {{tools}}? The installed version is too old.",
|
|
347
347
|
"offer_restart": "Restart {{tool}} so the new config takes effect? It is running and its windows will close.",
|
|
348
|
+
"reopen_hint": "Reopen {{tool}} for the new config to take effect (it is running and was not restarted)",
|
|
348
349
|
"restarted": "{{tool}} restarted",
|
|
349
350
|
"restart_failed": "Could not restart {{tool}}; quit it completely and open it again",
|
|
350
351
|
"elevation_running": "Click Yes in the Windows prompt…",
|
package/dist/locales/zh_CN.json
CHANGED
|
@@ -345,6 +345,7 @@
|
|
|
345
345
|
"failed_summary": "{{count}} 个工具未完成配置,原因见上方",
|
|
346
346
|
"offer_upgrade": "升级 {{tools}}?当前版本过旧。",
|
|
347
347
|
"offer_restart": "重启 {{tool}} 让新配置生效?它正在运行,当前窗口会被关闭。",
|
|
348
|
+
"reopen_hint": "重新打开 {{tool}} 后生效(它正在运行,没有自动重启)",
|
|
348
349
|
"restarted": "已重启 {{tool}}",
|
|
349
350
|
"restart_failed": "无法自动重启 {{tool}},请完全退出后手动打开",
|
|
350
351
|
"elevation_running": "请在弹出的系统窗口里点击「是」…",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibeapi/api-helper",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.146",
|
|
4
4
|
"description": "CLI tool for managing AI coding assistants (Claude Code, Codex, OpenClaw, Hermes, AtomCode, Grok Build) with one unified config",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|