Merge pull request #144 from ajnart/dev

v0.5.0 : Quality of life and dev experience
This commit is contained in:
Bjorn Lammers
2022-05-23 21:49:14 +02:00
committed by ajnart
36 changed files with 2183 additions and 3111 deletions

14
src/tools/migrate.ts Normal file
View File

@@ -0,0 +1,14 @@
import { v4 as uuidv4 } from 'uuid';
import { Config } from './types';
export function migrateToIdConfig(config: Config): Config {
// Set the config and add an ID to all the services that don't have one
const services = config.services.map((service) => ({
...service,
id: service.id ?? uuidv4(),
}));
return {
...config,
services,
};
}