async updateSettings(settings) {
        // abort if any settings do not match known settings
        const firstUnknownSetting = settings.find(setting => !this._activeThemeSettings[setting.key]);

        if (firstUnknownSetting) {
            throw new ValidationError({
                message: tpl(messages.problemFindingSetting, {key: firstUnknownSetting.key})
            });
        }

        settings.forEach((setting) => {
            const definition = this._activeThemeSettings[setting.key];
            switch (definition.type) {
            case 'select':
                if (!definition.options.includes(setting.value)) {
                    throw new ValidationError({
                        message: tpl(messages.unallowedValueForSetting, {key: setting.key, allowedValues: definition.options.join(', ')})
                    });
                }
                break;
            case 'boolean':
                if (![true, false].includes(setting.value)) {
                    throw new ValidationError({
                        message: tpl(messages.unallowedValueForSetting, {key: setting.key, allowedValues: [true, false].join(', ')})
                    });
                }
                break;
            case 'color':
                if (!/^#[0-9a-f]{6}$/i.test(setting.value)) {
                    throw new ValidationError({
                        message: tpl(messages.invalidValueForSetting, {key: setting.key, format: '#1234AF'})
                    });
                }
                break;
            default:
                break;
            }
        });

        // save the new values
        for (const setting of settings) {
            const theme = this.activeThemeName;
            const {key, value} = setting;

            const settingRecord = await this._repository.read({theme, key});

            settingRecord.set('value', value);

            if (settingRecord.hasChanged()) {
                await settingRecord.save(null);
            }

            // update the internal cache
            this._activeThemeSettings[setting.key].value = setting.value;
        }

        const settingsObjects = this.listSettings();

        // update the public cache
        this._valueCache.populate(
            this._computeCachedSettings(settingsObjects)
        );

        // return full setting objects
        return settingsObjects;
    }
@param {Array} settings - array of setting objects with at least key and value properties