Commit 55b0f95
committed
fix(cli): wheels routes prints route table instead of AI-docs JSON dump
`wheels routes` was hitting `/wheels/ai?context=routing` — the framework's
AI-documentation endpoint, which dumps ~500KB of JSON describing routing
patterns/helpers. The user expected (and the CLI help promised) the
application's actual route table.
Two coordinated fixes:
- cli/lucli/Module.cfc: switch `routes()` to call
`/wheels/cli?command=routes&format=json` (the existing endpoint that
serializes `application.wheels.routes`), parse the JSON, and print a
formatted table with METHOD / PATTERN / CONTROLLER#ACTION columns plus
the route name in parentheses where set. Pattern leading "/" is
normalised so each row has exactly one.
- vendor/wheels/public/views/cli.cfm: the `case "routes":` branch was
reading `application.wheels.appKey` as a property — but `appKey` is a
function (`$appKey()`), not a property. The lookup failed silently and
`data.routes` came back empty with `success: false`. Routes live at
`application.wheels.routes` directly (the convention every other case
in this file already uses); switch to that.
Sample output:
METHOD PATTERN CONTROLLER#ACTION
----------------------------------------------
GET /wheels/info wheels.public#info (wheelsInfo)
GET / main#index (root)
...
35 route(s)
Fixes #2317.1 parent a85a43e commit 55b0f95
2 files changed
Lines changed: 66 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
509 | 513 | | |
510 | 514 | | |
511 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
512 | 570 | | |
513 | 571 | | |
514 | 572 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
421 | 424 | | |
422 | 425 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
| 426 | + | |
| 427 | + | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| |||
0 commit comments