transformOptionsToSelectList = (options, prefix) => {
	const output = [];
	for (const [k, v] of Object.entries(options[OptionGetSpec])) {
		const keyWithPrefix = prefix ? `${prefix}.${k}` : k;
		const title = chalk.bold(keyWithPrefix);
		const description = chalk.dim(`(${v.description ?? ''})`);
		const shown = (v.secret && v.shown) || !v.secret;
		const unsetMarker = v.required ? chalk.bold.red('unset') : chalk.yellow('unset');
		const hasValue = options[k] || (v.default !== undefined && v.default !== null);

		const currentValue =
			(v.children ? options[OptionParentMode][k] : options[k]) ??
			chalk.yellow(v.default) ??
			unsetMarker;
		const shownValue = shown ? `[${currentValue}]` : `[hidden, ${hasValue ? 'set' : unsetMarker}]`;
		output.push({
			label: `${title} ${shownValue} ${description}`,
			value: keyWithPrefix.split('.')
		});

		if (v.children && typeof options[OptionSpecMode][k] === 'object') {
			output.push(...transformOptionsToSelectList(options[k], keyWithPrefix));
		}
	}
	return output;
}
@param {*} options
@param {string} [prefix]
@returns {{label: string, value: string[]}[]}