Commit 37ba4da
authored
Add upgrade rules to be implemented to zap file open and implement user-selected package persistence for .zap file imports when the paths in it a wrong relatively (#1643)
* Add getUpgradePackageMatch function to util.js for package matching logic
* Modify httpPostFileOpen to extract and use selectedZclPackages/selectedTemplatePackages from request
* Update ZapConfig.vue submitForm to include selected packages in file open requests
* Enhance importDataFromFile to respect user-selected packages over embedded packages
* Add upgrade package matching and rule execution during import process
This ensures that user package selections from the UI are respected when
opening .zap files, rather than defaulting to packages embedded in the
.zap file itself. The changes maintain backward compatibility while
adding support for package upgrade rules and multi-protocol configurations.
- Resolves issue where package selections were not persisted during file operations.
- Adding unit tests for the upgrade rule on file open/import
- eliminate redundant upgrade rules code in startup.js and fix unit test failures
- Github: ZAP #16381 parent d6ee831 commit 37ba4da
File tree
11 files changed
+2748
-88
lines changed- docs
- src-electron
- importexport
- main-process
- rest
- util
- src/pages
- test
- resource
- zcl-builtin/matter
11 files changed
+2748
-88
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19161 | 19161 | | |
19162 | 19162 | | |
19163 | 19163 | | |
| 19164 | + | |
19164 | 19165 | | |
19165 | 19166 | | |
19166 | 19167 | | |
| |||
19459 | 19460 | | |
19460 | 19461 | | |
19461 | 19462 | | |
| 19463 | + | |
| 19464 | + | |
| 19465 | + | |
| 19466 | + | |
| 19467 | + | |
| 19468 | + | |
| 19469 | + | |
| 19470 | + | |
| 19471 | + | |
| 19472 | + | |
| 19473 | + | |
| 19474 | + | |
| 19475 | + | |
| 19476 | + | |
| 19477 | + | |
| 19478 | + | |
19462 | 19479 | | |
19463 | 19480 | | |
19464 | 19481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
146 | 198 | | |
147 | 199 | | |
148 | 200 | | |
| |||
179 | 231 | | |
180 | 232 | | |
181 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
182 | 320 | | |
183 | 321 | | |
184 | 322 | | |
| |||
269 | 407 | | |
270 | 408 | | |
271 | 409 | | |
| 410 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | 225 | | |
265 | 226 | | |
266 | 227 | | |
| |||
299 | 260 | | |
300 | 261 | | |
301 | 262 | | |
302 | | - | |
| 263 | + | |
303 | 264 | | |
304 | 265 | | |
305 | 266 | | |
306 | 267 | | |
307 | 268 | | |
308 | | - | |
| 269 | + | |
309 | 270 | | |
310 | 271 | | |
311 | 272 | | |
312 | 273 | | |
313 | 274 | | |
314 | 275 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
| 276 | + | |
356 | 277 | | |
357 | 278 | | |
358 | 279 | | |
| |||
837 | 758 | | |
838 | 759 | | |
839 | 760 | | |
840 | | - | |
| 761 | + | |
841 | 762 | | |
842 | 763 | | |
843 | 764 | | |
844 | 765 | | |
845 | 766 | | |
846 | | - | |
| 767 | + | |
847 | 768 | | |
848 | 769 | | |
849 | 770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
85 | 115 | | |
86 | 116 | | |
87 | 117 | | |
| |||
0 commit comments