Commit ab8cc5a
authored
* Don't pass cliPath to client if cliUrl was provided
* Add cliPath option and validate it at runtime
Include an optional cliPath in the client options type and update the Omit<> to account for it. Simplify the default assignment for cliPath (use cliUrl to disable, otherwise use provided cliPath or bundled fallback). Add a runtime check that throws a clear error if cliPath is not available before trying to access the file system, ensuring users provide a local CLI path or use cliUrl.
* Add test: cliPath undefined when cliUrl set
Add a unit test to nodejs/test/client.test.ts that verifies CopilotClient does not resolve or set options.cliPath when instantiated with a cliUrl. This ensures providing a remote CLI URL doesn't trigger resolution of a local CLI path.
1 parent 27f487f commit ab8cc5a
2 files changed
+21
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
145 | 148 | | |
| 149 | + | |
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| |||
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
233 | | - | |
| 237 | + | |
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
| |||
1135 | 1139 | | |
1136 | 1140 | | |
1137 | 1141 | | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1138 | 1148 | | |
1139 | 1149 | | |
1140 | 1150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
| |||
0 commit comments