bitfab-cli 0.2.8 → 0.2.9
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/index.js +62 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26831,14 +26831,29 @@ function runClaudeAssistant(args, skipPermissions) {
|
|
|
26831
26831
|
});
|
|
26832
26832
|
}
|
|
26833
26833
|
function runClaudeUpdate(args, skipPermissions) {
|
|
26834
|
-
const
|
|
26835
|
-
|
|
26834
|
+
const mode = args[0] === "plugin" || args[0] === "sdk" ? args[0] : "all";
|
|
26835
|
+
if (mode === "plugin" || mode === "all") {
|
|
26836
|
+
const s = p.spinner();
|
|
26837
|
+
s.start("Refreshing bitfab marketplace");
|
|
26838
|
+
runClaude(["plugin", "marketplace", "update", MARKETPLACE]);
|
|
26839
|
+
s.stop("Marketplace refreshed");
|
|
26840
|
+
s.start("Updating bitfab plugin");
|
|
26841
|
+
const out = runClaude(["plugin", "update", PLUGIN_KEY, "--scope", "user"]);
|
|
26842
|
+
if (out.includes("already") || out.includes("up to date")) {
|
|
26843
|
+
s.stop("Plugin already up to date");
|
|
26844
|
+
} else {
|
|
26845
|
+
s.stop("Plugin updated");
|
|
26846
|
+
}
|
|
26847
|
+
}
|
|
26848
|
+
if (mode === "sdk" || mode === "all") {
|
|
26849
|
+
p.log.info(`Launching ${UPDATE_COMMAND} sdk...
|
|
26836
26850
|
`);
|
|
26837
|
-
|
|
26838
|
-
|
|
26839
|
-
|
|
26840
|
-
|
|
26841
|
-
|
|
26851
|
+
const flags = skipPermissions ? ["--dangerously-skip-permissions"] : [];
|
|
26852
|
+
spawnSync("claude", [...flags, UPDATE_COMMAND, "sdk"], {
|
|
26853
|
+
stdio: "inherit",
|
|
26854
|
+
...SHELL_OPTS
|
|
26855
|
+
});
|
|
26856
|
+
}
|
|
26842
26857
|
}
|
|
26843
26858
|
function isPluginDisabled() {
|
|
26844
26859
|
const listOut = runClaude(["plugin", "list"]);
|
|
@@ -26943,14 +26958,37 @@ function runCodexAssistant(args, skipPermissions) {
|
|
|
26943
26958
|
});
|
|
26944
26959
|
}
|
|
26945
26960
|
function runCodexUpdate(args, skipPermissions) {
|
|
26946
|
-
const
|
|
26947
|
-
|
|
26961
|
+
const mode = args[0] === "plugin" || args[0] === "sdk" ? args[0] : "all";
|
|
26962
|
+
if (mode === "plugin" || mode === "all") {
|
|
26963
|
+
const s = p2.spinner();
|
|
26964
|
+
s.start("Upgrading bitfab marketplace plugin");
|
|
26965
|
+
const result = spawnSync2(
|
|
26966
|
+
"codex",
|
|
26967
|
+
["plugin", "marketplace", "upgrade", "bitfab"],
|
|
26968
|
+
{ stdio: "pipe", ...SHELL_OPTS2 }
|
|
26969
|
+
);
|
|
26970
|
+
if (result.status !== 0) {
|
|
26971
|
+
s.stop("Marketplace upgrade failed");
|
|
26972
|
+
throw new Error(
|
|
26973
|
+
`codex plugin marketplace upgrade failed${result.status === null ? "" : ` with status ${result.status}`}`
|
|
26974
|
+
);
|
|
26975
|
+
}
|
|
26976
|
+
const out = (result.stdout?.toString() ?? "") + (result.stderr?.toString() ?? "");
|
|
26977
|
+
if (out.includes("already") || out.includes("up to date")) {
|
|
26978
|
+
s.stop("Plugin already up to date");
|
|
26979
|
+
} else {
|
|
26980
|
+
s.stop("Plugin updated");
|
|
26981
|
+
}
|
|
26982
|
+
}
|
|
26983
|
+
if (mode === "sdk" || mode === "all") {
|
|
26984
|
+
p2.log.info(`Launching ${UPDATE_COMMAND2} sdk...
|
|
26948
26985
|
`);
|
|
26949
|
-
|
|
26950
|
-
|
|
26951
|
-
|
|
26952
|
-
|
|
26953
|
-
|
|
26986
|
+
const flags = skipPermissions ? ["--full-auto"] : [];
|
|
26987
|
+
spawnSync2("codex", [...flags, UPDATE_COMMAND2, "sdk"], {
|
|
26988
|
+
stdio: "inherit",
|
|
26989
|
+
...SHELL_OPTS2
|
|
26990
|
+
});
|
|
26991
|
+
}
|
|
26954
26992
|
}
|
|
26955
26993
|
function enableCodexPlugin(configPath) {
|
|
26956
26994
|
let content = "";
|
|
@@ -27038,8 +27076,15 @@ function runCursorUpdate(args, skipPermissions) {
|
|
|
27038
27076
|
if (skipPermissions) {
|
|
27039
27077
|
p3.log.warn("--skip-permissions is not supported for Cursor");
|
|
27040
27078
|
}
|
|
27041
|
-
const
|
|
27042
|
-
|
|
27079
|
+
const mode = args[0] === "plugin" || args[0] === "sdk" ? args[0] : "all";
|
|
27080
|
+
const lines = [];
|
|
27081
|
+
if (mode === "plugin" || mode === "all") {
|
|
27082
|
+
lines.push(`Run ${UPDATE_COMMAND3} plugin (updates the plugin)`);
|
|
27083
|
+
}
|
|
27084
|
+
if (mode === "sdk" || mode === "all") {
|
|
27085
|
+
lines.push(`Run ${UPDATE_COMMAND3} sdk (updates installed SDKs)`);
|
|
27086
|
+
}
|
|
27087
|
+
p3.note(lines.join("\n"), "Update Bitfab in Cursor");
|
|
27043
27088
|
}
|
|
27044
27089
|
function copyToClipboard(text) {
|
|
27045
27090
|
const cmd = clipboardCommand();
|
|
@@ -27277,7 +27322,7 @@ Commands:
|
|
|
27277
27322
|
logout Remove stored credentials
|
|
27278
27323
|
setup [--editor <name>] Launch /bitfab:setup in the editor
|
|
27279
27324
|
assistant [--editor <name>] [args] Launch /bitfab:assistant in the editor
|
|
27280
|
-
update [--editor <name>] [
|
|
27325
|
+
update [--editor <name>] [mode] Update plugin, then launch SDK update (mode: all|plugin|sdk)
|
|
27281
27326
|
help Show this help
|
|
27282
27327
|
|
|
27283
27328
|
Options:
|