Commit d1fcec5
bgagent
fix(cdk): accept -c JSON-string bedrockModels override (#628) resolveBedrockModelIds rejected any non-array context value, but CDK delivers a
-c key=value context value as a raw string — so the -c bedrockModels='[...]' form the function's own JSDoc advertises threw at synth, while the cdk.context.json array form worked. JSON-parse a string context value before the array check so both forms behave identically. A non-JSON string (a true typo) is left as-is and still fails the array check with the same clear, key-named error, so loud-fail on malformed input is preserved. Same fix shape as resolveAgentCoreAzOverride (#358 review follow-up). Tests: added -c JSON-string array (success) and JSON-string-non-array (throws) cases.1 parent f11d17a commit d1fcec5
2 files changed
Lines changed: 29 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
65 | 77 | | |
66 | 78 | | |
67 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
44 | 59 | | |
45 | 60 | | |
46 | 61 | | |
| |||
0 commit comments