farai 0.3.5 → 0.3.6
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/cli/index.js +21 -6
- package/dist/cli/index.js.map +7 -7
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -8784,8 +8784,8 @@ var init_process_output = __esm(() => {
|
|
|
8784
8784
|
|
|
8785
8785
|
// src/version.ts
|
|
8786
8786
|
function resolveFaraiVersion() {
|
|
8787
|
-
if ("0.3.
|
|
8788
|
-
return "0.3.
|
|
8787
|
+
if ("0.3.6")
|
|
8788
|
+
return "0.3.6";
|
|
8789
8789
|
try {
|
|
8790
8790
|
const parsed = JSON.parse(readBoundedFileTextSync(new URL("../package.json", import.meta.url), 1024 * 1024, "package metadata"));
|
|
8791
8791
|
if (typeof parsed.version === "string" && parsed.version)
|
|
@@ -44980,6 +44980,17 @@ var init_runtime = __esm(() => {
|
|
|
44980
44980
|
|
|
44981
44981
|
// src/branding.ts
|
|
44982
44982
|
import figlet from "figlet";
|
|
44983
|
+
function printBannerOnce() {
|
|
44984
|
+
if (bannerPrinted)
|
|
44985
|
+
return;
|
|
44986
|
+
bannerPrinted = true;
|
|
44987
|
+
console.log(FARAI_BANNER);
|
|
44988
|
+
}
|
|
44989
|
+
function clearBannerIfShown() {
|
|
44990
|
+
if (!bannerPrinted || !process.stdout.isTTY)
|
|
44991
|
+
return;
|
|
44992
|
+
process.stdout.write("\x1B[2J\x1B[3J\x1B[H");
|
|
44993
|
+
}
|
|
44983
44994
|
function renderFaraiBanner() {
|
|
44984
44995
|
try {
|
|
44985
44996
|
return figlet.textSync("farai", {
|
|
@@ -44989,7 +45000,7 @@ function renderFaraiBanner() {
|
|
|
44989
45000
|
return "farai";
|
|
44990
45001
|
}
|
|
44991
45002
|
}
|
|
44992
|
-
var FARAI_BANNER, FARAI_BANNER_LINES;
|
|
45003
|
+
var FARAI_BANNER, FARAI_BANNER_LINES, bannerPrinted = false;
|
|
44993
45004
|
var init_branding = __esm(() => {
|
|
44994
45005
|
FARAI_BANNER = renderFaraiBanner();
|
|
44995
45006
|
FARAI_BANNER_LINES = FARAI_BANNER.split(`
|
|
@@ -45834,6 +45845,7 @@ async function runStartupContentPreflight(workspace) {
|
|
|
45834
45845
|
}
|
|
45835
45846
|
async function promptForUpdate(version, knowledge, skills) {
|
|
45836
45847
|
const contents = [knowledge ? "knowledge" : undefined, skills ? "skills" : undefined].filter(Boolean).join(" + ");
|
|
45848
|
+
printBannerOnce();
|
|
45837
45849
|
console.log("");
|
|
45838
45850
|
console.log(`farai content ${version} is available${contents ? ` (${contents})` : ""}`);
|
|
45839
45851
|
const interfaceHandle = createInterface({
|
|
@@ -45888,6 +45900,7 @@ function errorMessage7(error) {
|
|
|
45888
45900
|
return error instanceof Error ? error.message : String(error);
|
|
45889
45901
|
}
|
|
45890
45902
|
var init_preflight = __esm(() => {
|
|
45903
|
+
init_branding();
|
|
45891
45904
|
init_config();
|
|
45892
45905
|
init_updater();
|
|
45893
45906
|
});
|
|
@@ -45925,6 +45938,7 @@ async function runStartupContainerPreflight(workspace) {
|
|
|
45925
45938
|
return "continue";
|
|
45926
45939
|
}
|
|
45927
45940
|
async function promptForImagePull(exists) {
|
|
45941
|
+
printBannerOnce();
|
|
45928
45942
|
console.log("");
|
|
45929
45943
|
console.log(exists ? "a newer kali container image is available" : "kali container image is not installed");
|
|
45930
45944
|
const interfaceHandle = createInterface2({
|
|
@@ -45959,6 +45973,7 @@ async function spawnPull() {
|
|
|
45959
45973
|
return await proc.exited;
|
|
45960
45974
|
}
|
|
45961
45975
|
var init_preflight2 = __esm(() => {
|
|
45976
|
+
init_branding();
|
|
45962
45977
|
init_config();
|
|
45963
45978
|
init_docker_environment();
|
|
45964
45979
|
init_kali();
|
|
@@ -67982,7 +67997,7 @@ function footerRightItems(backgroundActivities, subagents, browserContexts, queu
|
|
|
67982
67997
|
items.push({
|
|
67983
67998
|
id: "update",
|
|
67984
67999
|
kind: "update",
|
|
67985
|
-
text: `update ${updateNotice.latestVersion}`
|
|
68000
|
+
text: `update available ${updateNotice.latestVersion}`
|
|
67986
68001
|
});
|
|
67987
68002
|
}
|
|
67988
68003
|
if (contextUsage && contextUsage.tokens >= 0) {
|
|
@@ -76193,7 +76208,6 @@ async function initLab(args2) {
|
|
|
76193
76208
|
}
|
|
76194
76209
|
async function launchTui(workspace, sessionId) {
|
|
76195
76210
|
ensureDefaultUserConfig();
|
|
76196
|
-
console.log(FARAI_BANNER);
|
|
76197
76211
|
const {
|
|
76198
76212
|
runStartupContentPreflight: runStartupContentPreflight2
|
|
76199
76213
|
} = await Promise.resolve().then(() => (init_preflight(), exports_preflight));
|
|
@@ -76209,6 +76223,7 @@ async function launchTui(workspace, sessionId) {
|
|
|
76209
76223
|
process.exitCode = 130;
|
|
76210
76224
|
return;
|
|
76211
76225
|
}
|
|
76226
|
+
clearBannerIfShown();
|
|
76212
76227
|
if (import.meta.path.endsWith(".ts")) {
|
|
76213
76228
|
const sourceTuiPreload = "@opentui/solid/preload";
|
|
76214
76229
|
await import(sourceTuiPreload);
|
|
@@ -76422,5 +76437,5 @@ Examples:
|
|
|
76422
76437
|
`);
|
|
76423
76438
|
}
|
|
76424
76439
|
|
|
76425
|
-
//# debugId=
|
|
76440
|
+
//# debugId=80A953E297D3B0EB64756E2164756E21
|
|
76426
76441
|
//# sourceMappingURL=index.js.map
|