Commit 82ef4ef
committed
feat: add estimated_functions to analyze response (function-level indexing)
Indexing is function-level, not file-level. Tier limits are function-based
(2K free, 20K pro, 500K enterprise). But the analyze endpoint only returned
file counts -- users couldn't compare against their limits.
Now each directory entry includes estimated_functions (file_count * 25,
same multiplier RepoValidator uses for tier checks). Response also includes
total_estimated_functions for the whole repo.
Effect-TS example:
packages/effect: 958 files, ~23,950 functions
packages/schema: 203 files, ~5,075 functions
Total: 1,767 files, ~44,175 functions
User on Pro tier (20K limit) can immediately see they need to pick a subset.
24 tests pass (1 new for function estimation).1 parent 44cce98 commit 82ef4ef
2 files changed
Lines changed: 45 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
231 | 235 | | |
232 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
233 | 244 | | |
234 | 245 | | |
235 | 246 | | |
236 | 247 | | |
237 | 248 | | |
238 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
239 | 256 | | |
240 | 257 | | |
241 | 258 | | |
| |||
245 | 262 | | |
246 | 263 | | |
247 | 264 | | |
| 265 | + | |
248 | 266 | | |
249 | 267 | | |
250 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
133 | 157 | | |
134 | 158 | | |
135 | 159 | | |
| |||
0 commit comments