(metadata: ImageMetadataEntry[], hook: (keyof SchemaFeatureLifecycleHooks))
| 144 | } |
| 145 | |
| 146 | function mergeLifecycleHooks(metadata: ImageMetadataEntry[], hook: (keyof SchemaFeatureLifecycleHooks)): LifecycleCommand[] | undefined { |
| 147 | const collected: LifecycleCommand[] = []; |
| 148 | for (const entry of metadata) { |
| 149 | const command = entry[hook]; |
| 150 | if (command) { |
| 151 | collected.push(command); |
| 152 | } |
| 153 | } |
| 154 | return collected; |
| 155 | } |
| 156 | |
| 157 | export function mergeConfiguration(config: DevContainerConfig, imageMetadata: ImageMetadataEntry[]): MergedDevContainerConfig { |
| 158 | const customizations = imageMetadata.reduce((obj, entry) => { |
no outgoing calls
no test coverage detected