@rilaptra/digester 17.2.0-ai → 17.5.0-ai
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/README.md +152 -152
- package/dist/index.js +202 -10
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
# ⚡ DIGESTER
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
░██
|
|
8
|
-
░██ ░██
|
|
9
|
-
░██ ░██ ░██░██ ░██
|
|
10
|
-
░██
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-

|
|
148
|
-
- 🐙 [GitHub](https://github.com/Rilaptra)
|
|
149
|
-
|
|
150
|
-
---
|
|
151
|
-
|
|
152
|
-
> _"Code by Human, Optimized by Logic, Powered by AI."_ ⚡
|
|
1
|
+
# ⚡ DIGESTER
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<div align="center">
|
|
5
|
+
```text
|
|
6
|
+
░███████ ░██ ░██
|
|
7
|
+
░██ ░██ ░██
|
|
8
|
+
░██ ░██ ░██ ░████████ ░███████ ░███████ ░████████ ░███████ ░██░████
|
|
9
|
+
░██ ░██ ░██░██ ░██ ░██ ░██ ░██ ░██ ░██ ░██ ░███
|
|
10
|
+
░██ ░██ ░██░██ ░██ ░█████████ ░███████ ░██ ░█████████ ░██
|
|
11
|
+
░██ ░██ ░██░██ ░███ ░██ ░██ ░██ ░██ ░██
|
|
12
|
+
░███████ ░██ ░█████░██ ░███████ ░███████ ░████ ░███████ ░██
|
|
13
|
+
░██
|
|
14
|
+
░███████
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+

|
|
19
|
+

|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
> **The Ultimate AI Operations Agent & Codebase Context Engine.**
|
|
23
|
+
> Built for speed on low-end hardware. Zero dependencies bloat. 100% Bun Native.
|
|
24
|
+
|
|
25
|
+
**Digester** is not just a context generator. It is a highly optimized CLI toolkit that turns your codebase into a liquid format for LLMs, automates your Git workflows with AI, traces dependencies, and protects your secrets—all running on a toaster-friendly memory footprint.
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 🌟 Why Digester?
|
|
32
|
+
|
|
33
|
+
- **⚡ Blazingly Fast:** Powered by Bun, scanning thousands of files in milliseconds.
|
|
34
|
+
- **🎨 Custom TUI Engine:** No heavy prompt libraries. Built-in, zero-allocation UI components (Grid Select, Editors, Spinners).
|
|
35
|
+
- **🛡️ Security Guard:** AI scans your staged changes for leaked secrets (API Keys, tokens) _before_ you commit.
|
|
36
|
+
- **🧠 Dependency Tracing:** Recursively maps out imports from an entry point to create a focused context graph.
|
|
37
|
+
- **🌍 Remote Ops:** Clone, scan, and digest remote GitHub repositories in temporary sandboxes without polluting your disk.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🚀 Key Features
|
|
42
|
+
|
|
43
|
+
### 1. 🤖 AI Auto-Ops Agent
|
|
44
|
+
|
|
45
|
+
Stop writing commit messages manually.
|
|
46
|
+
|
|
47
|
+
- **Auto-Commit:** Analyzes `git diff`, writes Conventional Commits, and generates a bullet-point Changelog.
|
|
48
|
+
- **Auto-Version:** Smart SemVer bumping (Major/Minor/Patch) based on code analysis.
|
|
49
|
+
- **Pre-Push Hooks:** Runs configured scripts or TS files before pushing to ensure quality.
|
|
50
|
+
|
|
51
|
+
### 2. 🗺️ Code Cartography
|
|
52
|
+
|
|
53
|
+
Understand your project instantly.
|
|
54
|
+
|
|
55
|
+
- **`digest tree`:** Visualize your project structure with smart file-type icons.
|
|
56
|
+
- **`digest trace`:** Generate a markdown digest _only_ for files related to a specific entry point (e.g., `src/index.ts`).
|
|
57
|
+
- **`digest git`:** Digest a remote repo URL directly (e.g., `digest git user/repo`).
|
|
58
|
+
|
|
59
|
+
### 3. 🛠️ Developer Experience (DX)
|
|
60
|
+
|
|
61
|
+
- **Auto-Build Watcher:** `digest autobuild` watches changes and recompiles with audio feedback.
|
|
62
|
+
- **Scaffolder:** `digest gen` creates new Commands or Managers instantly.
|
|
63
|
+
- **Self-Healing:** `digest update` pulls the latest version of itself and rebuilds locally.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 📥 Installation
|
|
68
|
+
|
|
69
|
+
Digester is optimized for **Bun**. Ensure you have it installed.
|
|
70
|
+
|
|
71
|
+
### Option A: From Source (Recommended)
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# 1. Clone
|
|
75
|
+
git clone https://github.com/Rilaptra/digester.git
|
|
76
|
+
cd digester
|
|
77
|
+
|
|
78
|
+
# 2. Install Deps
|
|
79
|
+
bun install
|
|
80
|
+
|
|
81
|
+
# 3. Build & Setup (Adds to PATH)
|
|
82
|
+
bun run setup
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Option B: Quick Start (Dev Mode)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
bun install
|
|
89
|
+
bun run dev
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 🎮 Command Reference
|
|
95
|
+
|
|
96
|
+
| Command | Alias | Description |
|
|
97
|
+
| :----------------- | :-------- | :--------------------------------------------------------- |
|
|
98
|
+
| `digest scan` | `.` | Scan current directory and generate context. |
|
|
99
|
+
| `digest commit` | `ci` | **AI Agent:** Auto-commit, version bump, changelog, push. |
|
|
100
|
+
| `digest check` | `ck` | Scan staged changes for secret leaks/security risks. |
|
|
101
|
+
| `digest git` | `clone` | Clone & digest a remote Git repository (URL or user/repo). |
|
|
102
|
+
| `digest trace` | `deps` | Trace dependencies recursively from an entry file. |
|
|
103
|
+
| `digest tree` | `t` | Display project structure with icons & stats. |
|
|
104
|
+
| `digest source` | `src` | Self-digest: Scan the Digester source code itself. |
|
|
105
|
+
| `digest gen` | `new` | Scaffold new Commands or Managers. |
|
|
106
|
+
| `digest config` | `init` | Generate default `prompter.config.json`. |
|
|
107
|
+
| `digest autobuild` | `dev` | Watch mode with auto-recompile & sound alerts. |
|
|
108
|
+
| `digest update` | `upgrade` | Self-update Digester from the repo. |
|
|
109
|
+
| `digest set-key` | `auth` | Set your Google Gemini API Key. |
|
|
110
|
+
| `digest set-model` | `model` | Switch AI Models (Flash/Pro). |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## ⚙️ Configuration
|
|
115
|
+
|
|
116
|
+
Customize behavior via `prompter.config.json`:
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"ignoredPatterns": ["node_modules", "dist", ".git", ".next"],
|
|
121
|
+
"ignoredExts": [".png", ".jpg", ".lock", ".tsbuildinfo"],
|
|
122
|
+
"maxFileSizeKB": 500,
|
|
123
|
+
"prePushScripts": ["lint", "test"]
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 🛡️ Architecture & Stack
|
|
130
|
+
|
|
131
|
+
Designed for **Resilience** and **Performance**.
|
|
132
|
+
|
|
133
|
+
- **Runtime:** [Bun](https://bun.sh) (Native Spawn, IO, SQLite)
|
|
134
|
+
- **Language:** TypeScript 5.0 (Strict)
|
|
135
|
+
- **Architecture:**
|
|
136
|
+
- **Core:** `Scanner`, `DependencyTracer`, `CommandLoader`
|
|
137
|
+
- **Managers:** `AIManager` (Gemini), `GitManager`, `ConfigManager`
|
|
138
|
+
- **Utils:** Zero-alloc Logger, Custom TUI System
|
|
139
|
+
- **Linter/Formatter:** Biome
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 👤 Author
|
|
144
|
+
|
|
145
|
+
**(Rilaptra)**
|
|
146
|
+
|
|
147
|
+
- 🌐 [Eryzsh Dashboard](https://erzysh.vercel.app)
|
|
148
|
+
- 🐙 [GitHub](https://github.com/Rilaptra)
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
> _"Code by Human, Optimized by Logic, Powered by AI."_ ⚡
|
package/dist/index.js
CHANGED
|
@@ -6872,6 +6872,8 @@ Generate beautiful gradient ANSI text files.`, "ANSI Generator");
|
|
|
6872
6872
|
outputFile = arg.split("=")[1];
|
|
6873
6873
|
} else if (arg.startsWith("--file=")) {
|
|
6874
6874
|
inputFilePath = arg.split("=")[1];
|
|
6875
|
+
} else if (arg.startsWith("--text=")) {
|
|
6876
|
+
text = arg.split("=")[1];
|
|
6875
6877
|
} else if (arg === "--from" && args[i + 1]) {
|
|
6876
6878
|
fromColor = args[++i];
|
|
6877
6879
|
} else if (arg === "--to" && args[i + 1]) {
|
|
@@ -6958,9 +6960,9 @@ Generate beautiful gradient ANSI text files.`, "ANSI Generator");
|
|
|
6958
6960
|
outputBuffer.push("");
|
|
6959
6961
|
continue;
|
|
6960
6962
|
}
|
|
6961
|
-
const chars = [...line];
|
|
6962
6963
|
let lineResult = "";
|
|
6963
|
-
|
|
6964
|
+
let x = 0;
|
|
6965
|
+
for (const char of line) {
|
|
6964
6966
|
const t = maxWidth > 1 ? x / (maxWidth - 1) : 0;
|
|
6965
6967
|
const rgbObj = {
|
|
6966
6968
|
r: this.lerp(c1.r, c2.r, t),
|
|
@@ -6969,7 +6971,8 @@ Generate beautiful gradient ANSI text files.`, "ANSI Generator");
|
|
|
6969
6971
|
};
|
|
6970
6972
|
const ansi = color(rgbObj, "ansi");
|
|
6971
6973
|
lineResult += `${ansi}${char}`;
|
|
6972
|
-
|
|
6974
|
+
x++;
|
|
6975
|
+
}
|
|
6973
6976
|
outputBuffer.push(lineResult);
|
|
6974
6977
|
}
|
|
6975
6978
|
outputBuffer.push("\x1B[0m");
|
|
@@ -6995,8 +6998,8 @@ import { dirname, join } from "path";
|
|
|
6995
6998
|
import { fileURLToPath } from "url";
|
|
6996
6999
|
// package.json
|
|
6997
7000
|
var package_default = {
|
|
6998
|
-
name: "@
|
|
6999
|
-
version: "17.
|
|
7001
|
+
name: "@rilaptra/digester",
|
|
7002
|
+
version: "17.5.0-ai",
|
|
7000
7003
|
description: "High-performance codebase context generator and AI operations toolkit optimized for Bun.",
|
|
7001
7004
|
module: "dist/index.js",
|
|
7002
7005
|
main: "dist/index.js",
|
|
@@ -7028,7 +7031,7 @@ var package_default = {
|
|
|
7028
7031
|
"productivity"
|
|
7029
7032
|
],
|
|
7030
7033
|
author: {
|
|
7031
|
-
name: "
|
|
7034
|
+
name: "Rilaptra",
|
|
7032
7035
|
url: "https://erzysh.vercel.app"
|
|
7033
7036
|
},
|
|
7034
7037
|
license: "MIT",
|
|
@@ -7163,7 +7166,7 @@ class AutoBuildCommand extends BaseCommand {
|
|
|
7163
7166
|
const watcher = watch(SYSTEM.ROOT_DIR, { recursive: true }, (event, filename) => {
|
|
7164
7167
|
if (!filename)
|
|
7165
7168
|
return;
|
|
7166
|
-
if (filename.includes("node_modules") || filename.includes(".git") || filename.includes("dist") || filename.includes("generated") || filename.includes("bin")) {
|
|
7169
|
+
if (filename.includes("node_modules") || filename.includes(".git") || filename.includes("dist") || filename.includes("generated") || filename.includes("src\\commands\\index.ts") || filename.includes("bin")) {
|
|
7167
7170
|
return;
|
|
7168
7171
|
}
|
|
7169
7172
|
if (!filename.endsWith(".ts") && !filename.endsWith("json")) {
|
|
@@ -8711,7 +8714,6 @@ class SetModelCommand extends BaseCommand {
|
|
|
8711
8714
|
spinner.stop();
|
|
8712
8715
|
if (models.length === 0)
|
|
8713
8716
|
throw new Error("No models found.");
|
|
8714
|
-
console.log(models);
|
|
8715
8717
|
const selection = await this.promptSelectV2(source_default.cyan("\uD83E\uDD16 Choose AI Model"), models, { columns: 1 });
|
|
8716
8718
|
await ConfigManager.saveAuth({ model: selection });
|
|
8717
8719
|
this.success(`Model set to: ${source_default.bold(selection)}`);
|
|
@@ -10179,6 +10181,193 @@ class CommandLoader {
|
|
|
10179
10181
|
}
|
|
10180
10182
|
}
|
|
10181
10183
|
|
|
10184
|
+
// src/managers/SystemManager.ts
|
|
10185
|
+
import { join as join16 } from "path";
|
|
10186
|
+
var import_cli_table37 = __toESM(require_table(), 1);
|
|
10187
|
+
var META_FILE = join16(SYSTEM.BIN_DIR, "system.meta.json");
|
|
10188
|
+
var CHECK_INTERVAL = 1000 * 60 * 60 * 12;
|
|
10189
|
+
var TIMEOUT_MS = 2500;
|
|
10190
|
+
|
|
10191
|
+
class SystemManager {
|
|
10192
|
+
static auditPromise = null;
|
|
10193
|
+
static meta = { lastUpdateCheck: 0 };
|
|
10194
|
+
static async init() {
|
|
10195
|
+
await SystemManager.loadMeta();
|
|
10196
|
+
const now = Date.now();
|
|
10197
|
+
if (now - SystemManager.meta.lastUpdateCheck < CHECK_INTERVAL) {
|
|
10198
|
+
return;
|
|
10199
|
+
}
|
|
10200
|
+
SystemManager.auditPromise = SystemManager.performAudit();
|
|
10201
|
+
SystemManager.meta.lastUpdateCheck = now;
|
|
10202
|
+
SystemManager.saveMeta();
|
|
10203
|
+
}
|
|
10204
|
+
static async loadMeta() {
|
|
10205
|
+
try {
|
|
10206
|
+
const file2 = Bun.file(META_FILE);
|
|
10207
|
+
if (await file2.exists()) {
|
|
10208
|
+
SystemManager.meta = await file2.json();
|
|
10209
|
+
}
|
|
10210
|
+
} catch {
|
|
10211
|
+
SystemManager.meta = { lastUpdateCheck: 0 };
|
|
10212
|
+
}
|
|
10213
|
+
}
|
|
10214
|
+
static async saveMeta() {
|
|
10215
|
+
try {
|
|
10216
|
+
const { mkdir } = await import("fs/promises");
|
|
10217
|
+
await mkdir(SYSTEM.BIN_DIR, { recursive: true });
|
|
10218
|
+
await Bun.write(META_FILE, JSON.stringify(SystemManager.meta));
|
|
10219
|
+
} catch {}
|
|
10220
|
+
}
|
|
10221
|
+
static async performAudit() {
|
|
10222
|
+
const checks = [];
|
|
10223
|
+
checks.push(SystemManager.checkPackage("@rilaptra/digester", SYSTEM.VERSION, "cli"));
|
|
10224
|
+
checks.push(SystemManager.checkPackage("bun", Bun.version, "runtime"));
|
|
10225
|
+
const projectChecks = await SystemManager.prepareProjectDeps();
|
|
10226
|
+
checks.push(...projectChecks);
|
|
10227
|
+
const results = await Promise.all(checks);
|
|
10228
|
+
return results.filter((r) => r !== null && r.current !== r.latest && SystemManager.isNewer(r.latest, r.current));
|
|
10229
|
+
}
|
|
10230
|
+
static async prepareProjectDeps() {
|
|
10231
|
+
try {
|
|
10232
|
+
const pkgPath = join16(process.cwd(), "package.json");
|
|
10233
|
+
const file2 = Bun.file(pkgPath);
|
|
10234
|
+
if (!await file2.exists())
|
|
10235
|
+
return [];
|
|
10236
|
+
const pkg = await file2.json();
|
|
10237
|
+
const requests = [];
|
|
10238
|
+
const addDeps = (deps, type) => {
|
|
10239
|
+
if (!deps)
|
|
10240
|
+
return;
|
|
10241
|
+
Object.entries(deps).forEach(([name, version]) => {
|
|
10242
|
+
const cleanVer = version.replace(/^[\^~]/, "");
|
|
10243
|
+
if (!/^\d/.test(cleanVer))
|
|
10244
|
+
return;
|
|
10245
|
+
requests.push(SystemManager.checkPackage(name, cleanVer, type));
|
|
10246
|
+
});
|
|
10247
|
+
};
|
|
10248
|
+
addDeps(pkg.dependencies, "dependency");
|
|
10249
|
+
addDeps(pkg.devDependencies, "dev-dependency");
|
|
10250
|
+
return requests;
|
|
10251
|
+
} catch {
|
|
10252
|
+
return [];
|
|
10253
|
+
}
|
|
10254
|
+
}
|
|
10255
|
+
static async checkPackage(name, currentVer, type) {
|
|
10256
|
+
try {
|
|
10257
|
+
const controller = new AbortController;
|
|
10258
|
+
const id = setTimeout(() => controller.abort(), TIMEOUT_MS);
|
|
10259
|
+
const res = await fetch(`https://registry.npmjs.org/${name}/latest`, {
|
|
10260
|
+
signal: controller.signal,
|
|
10261
|
+
headers: { Accept: "application/json" }
|
|
10262
|
+
});
|
|
10263
|
+
clearTimeout(id);
|
|
10264
|
+
if (!res.ok)
|
|
10265
|
+
return null;
|
|
10266
|
+
const data = await res.json();
|
|
10267
|
+
let severity = "info";
|
|
10268
|
+
if (type === "cli")
|
|
10269
|
+
severity = "critical";
|
|
10270
|
+
if (type === "runtime")
|
|
10271
|
+
severity = "warn";
|
|
10272
|
+
return {
|
|
10273
|
+
name,
|
|
10274
|
+
current: currentVer,
|
|
10275
|
+
latest: data.version,
|
|
10276
|
+
type,
|
|
10277
|
+
severity
|
|
10278
|
+
};
|
|
10279
|
+
} catch {
|
|
10280
|
+
return null;
|
|
10281
|
+
}
|
|
10282
|
+
}
|
|
10283
|
+
static async notify() {
|
|
10284
|
+
if (!SystemManager.auditPromise)
|
|
10285
|
+
return;
|
|
10286
|
+
try {
|
|
10287
|
+
const updates = await Promise.race([
|
|
10288
|
+
SystemManager.auditPromise,
|
|
10289
|
+
new Promise((r) => setTimeout(() => r([]), 800))
|
|
10290
|
+
]);
|
|
10291
|
+
if (!updates || updates.length === 0)
|
|
10292
|
+
return;
|
|
10293
|
+
SystemManager.renderReport(updates);
|
|
10294
|
+
} catch {}
|
|
10295
|
+
}
|
|
10296
|
+
static renderReport(updates) {
|
|
10297
|
+
generateLog({ type: "info", raw: true }, "");
|
|
10298
|
+
const cli = updates.find((u) => u.type === "cli");
|
|
10299
|
+
const runtime = updates.find((u) => u.type === "runtime");
|
|
10300
|
+
const deps = updates.filter((u) => u.type.includes("dependency"));
|
|
10301
|
+
if (cli) {
|
|
10302
|
+
generateLog({ type: "info", raw: true }, boxen(source_default.white(`New version available: `) + source_default.dim(cli.current) + source_default.reset(" \u279C ") + source_default.green.bold(cli.latest) + `
|
|
10303
|
+
|
|
10304
|
+
` + source_default.cyan("Run: ") + source_default.white.bold("digest update") + source_default.cyan(" or ") + source_default.white.bold("bun i -g @rilaptra/digester"), {
|
|
10305
|
+
padding: 1,
|
|
10306
|
+
margin: 0,
|
|
10307
|
+
borderStyle: "round",
|
|
10308
|
+
borderColor: "green",
|
|
10309
|
+
title: "\uD83D\uDE80 Digester Update",
|
|
10310
|
+
titleAlignment: "center"
|
|
10311
|
+
}));
|
|
10312
|
+
generateLog({ type: "info", raw: true }, "");
|
|
10313
|
+
}
|
|
10314
|
+
if (runtime) {
|
|
10315
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
10316
|
+
generateLog({ type: "warn", raw: true }, source_default.bgYellow.black.bold(" BUN UPDATE ") + source_default.yellow(` v${runtime.current} \u279C v${runtime.latest} `) + source_default.dim(`[${platform}]`));
|
|
10317
|
+
generateLog({ type: "info", raw: true }, source_default.dim(` Run 'bun upgrade' to optimize performance.
|
|
10318
|
+
`));
|
|
10319
|
+
}
|
|
10320
|
+
if (deps.length > 0) {
|
|
10321
|
+
const table = new import_cli_table37.default({
|
|
10322
|
+
head: [
|
|
10323
|
+
source_default.bold("Pkg"),
|
|
10324
|
+
source_default.bold("Type"),
|
|
10325
|
+
source_default.bold("Curr"),
|
|
10326
|
+
source_default.bold("Latest")
|
|
10327
|
+
],
|
|
10328
|
+
chars: {
|
|
10329
|
+
mid: "",
|
|
10330
|
+
"left-mid": "",
|
|
10331
|
+
"mid-mid": "",
|
|
10332
|
+
"right-mid": "",
|
|
10333
|
+
top: "",
|
|
10334
|
+
bottom: "",
|
|
10335
|
+
left: "",
|
|
10336
|
+
right: ""
|
|
10337
|
+
},
|
|
10338
|
+
style: { "padding-left": 1, "padding-right": 1 }
|
|
10339
|
+
});
|
|
10340
|
+
const limit = 5;
|
|
10341
|
+
deps.slice(0, limit).forEach((u) => {
|
|
10342
|
+
table.push([
|
|
10343
|
+
source_default.cyan(u.name),
|
|
10344
|
+
u.type === "dependency" ? "prod" : source_default.dim("dev"),
|
|
10345
|
+
source_default.red(u.current),
|
|
10346
|
+
source_default.green(u.latest)
|
|
10347
|
+
]);
|
|
10348
|
+
});
|
|
10349
|
+
generateLog({ type: "info", raw: true }, source_default.bold.white(`\uD83D\uDCE6 Project Dependencies (${deps.length} outdated):`));
|
|
10350
|
+
generateLog({ type: "info", raw: true }, table.toString());
|
|
10351
|
+
if (deps.length > limit) {
|
|
10352
|
+
generateLog({ type: "info", raw: true }, source_default.dim(` ... and ${deps.length - limit} more.`));
|
|
10353
|
+
}
|
|
10354
|
+
generateLog({ type: "info", raw: true }, source_default.dim(` Run 'bun update' to fix.
|
|
10355
|
+
`));
|
|
10356
|
+
}
|
|
10357
|
+
}
|
|
10358
|
+
static isNewer(latest, current) {
|
|
10359
|
+
const c = current.replace(/^[^\d]+/, "").split(".").map(Number);
|
|
10360
|
+
const l = latest.replace(/^[^\d]+/, "").split(".").map(Number);
|
|
10361
|
+
for (let i = 0;i < 3; i++) {
|
|
10362
|
+
if ((l[i] || 0) > (c[i] || 0))
|
|
10363
|
+
return true;
|
|
10364
|
+
if ((l[i] || 0) < (c[i] || 0))
|
|
10365
|
+
return false;
|
|
10366
|
+
}
|
|
10367
|
+
return false;
|
|
10368
|
+
}
|
|
10369
|
+
}
|
|
10370
|
+
|
|
10182
10371
|
// src/core/AppController.ts
|
|
10183
10372
|
class AppController {
|
|
10184
10373
|
loader;
|
|
@@ -10186,6 +10375,7 @@ class AppController {
|
|
|
10186
10375
|
this.loader = new CommandLoader;
|
|
10187
10376
|
}
|
|
10188
10377
|
async run() {
|
|
10378
|
+
SystemManager.init();
|
|
10189
10379
|
console.clear();
|
|
10190
10380
|
this.loader.registerCommands(Object.values(exports_commands));
|
|
10191
10381
|
const args = Bun.argv.slice(2);
|
|
@@ -10199,16 +10389,18 @@ class AppController {
|
|
|
10199
10389
|
}
|
|
10200
10390
|
command = this.loader.getCommand("scan");
|
|
10201
10391
|
commandArgs = [commandName, ...commandArgs];
|
|
10202
|
-
}
|
|
10392
|
+
}
|
|
10203
10393
|
if (command) {
|
|
10204
10394
|
try {
|
|
10205
10395
|
await command.execute(commandArgs, { loader: this.loader });
|
|
10206
10396
|
} catch (error2) {
|
|
10207
10397
|
generateLog({ type: "error" }, source_default.red("Command execution failed:"), error2.message);
|
|
10208
10398
|
process.exit(1);
|
|
10399
|
+
} finally {
|
|
10400
|
+
await SystemManager.notify();
|
|
10209
10401
|
}
|
|
10210
10402
|
} else {
|
|
10211
|
-
generateLog({ type: "error" }, source_default.red("Critical Error:
|
|
10403
|
+
generateLog({ type: "error" }, source_default.red("Critical Error: Command not found."));
|
|
10212
10404
|
process.exit(1);
|
|
10213
10405
|
}
|
|
10214
10406
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rilaptra/digester",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.5.0-ai",
|
|
4
4
|
"description": "High-performance codebase context generator and AI operations toolkit optimized for Bun.",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"productivity"
|
|
33
33
|
],
|
|
34
34
|
"author": {
|
|
35
|
-
"name": "
|
|
35
|
+
"name": "Rilaptra",
|
|
36
36
|
"url": "https://erzysh.vercel.app"
|
|
37
37
|
},
|
|
38
38
|
"license": "MIT",
|
|
@@ -59,4 +59,4 @@
|
|
|
59
59
|
"cli-table3": "^0.6.5",
|
|
60
60
|
"ora": "^9.0.0"
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
}
|