Commit c17d7a9
committed
fix(@angular/cli): add schema versioning and metadata to example database
This commit introduces schema versioning and metadata to the Angular CLI's example database.
A new `metadata` table has been added to both the runtime and build-time example databases. This table stores key-value pairs, initially including `schema_version` and `created_at`.
The `find_examples` tool now validates the `schema_version` of the loaded database. If a schema mismatch is detected, the tool throws a descriptive error message that guides the user on how to resolve the incompatibility (e.g., by updating their CLI or project's `@angular/core` package).
This change improves the robustness and maintainability of the example database by:
- Ensuring compatibility between the CLI and the example database schema.
- Providing actionable feedback to users when schema versions are incompatible.
- Laying the groundwork for future metadata additions and database evolution.
(cherry picked from commit a9acc2e)1 parent b65d22e commit c17d7a9
File tree
2 files changed
+67
-8
lines changed- packages/angular/cli/src/commands/mcp/tools
- tools
2 files changed
+67
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
315 | | - | |
| 316 | + | |
| 317 | + | |
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
320 | | - | |
321 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
322 | 325 | | |
323 | 326 | | |
324 | | - | |
| 327 | + | |
325 | 328 | | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
329 | 332 | | |
330 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
331 | 363 | | |
332 | 364 | | |
333 | 365 | | |
| |||
571 | 603 | | |
572 | 604 | | |
573 | 605 | | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
574 | 619 | | |
575 | 620 | | |
576 | 621 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
92 | 106 | | |
93 | 107 | | |
94 | 108 | | |
| |||
0 commit comments