(items: RegistryItem[], cliVersion?: string)
| 116 | // the shared gate's error into an AddError so the command surfaces the right |
| 117 | // exit code. Returns the accumulated (non-fatal) warnings from every item. |
| 118 | function assertCompatibleOrThrow(items: RegistryItem[], cliVersion?: string): string[] { |
| 119 | try { |
| 120 | return gateRegistryItemsCompatibility(items, cliVersion); |
| 121 | } catch (err) { |
| 122 | if (err instanceof RegistryCompatibilityError) { |
| 123 | throw new AddError(err.message, "incompatible-cli"); |
| 124 | } |
| 125 | throw err; |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | // Install a topologically-ordered plan (dependencies first, requested item |
| 130 | // last). The installer validates every target before any write; a failure on |
no test coverage detected