From 55ef4c5faa7073ec9bfdbeb3fb43590c7c5dd580 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 3 Dec 2025 18:20:41 +0900 Subject: [PATCH] tweak convert_config --- packages/backend/scripts/convert_config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/backend/scripts/convert_config.js b/packages/backend/scripts/convert_config.js index 32576621cb..e93baa409a 100644 --- a/packages/backend/scripts/convert_config.js +++ b/packages/backend/scripts/convert_config.js @@ -25,13 +25,16 @@ const configDir = resolve(_dirname, '../../../.config'); */ function convertYamlToJson(ymlPath, jsonPath) { if (!fs.existsSync(ymlPath)) { - console.log(`${ymlPath} が見つからないためスキップします`); + console.log(`skipped: ${ymlPath} is not found`); return; } const yamlContent = fs.readFileSync(ymlPath, 'utf-8'); const jsonContent = yaml.load(yamlContent); - fs.writeFileSync(jsonPath, JSON.stringify(jsonContent, null, 2), 'utf-8'); + fs.writeFileSync(jsonPath, JSON.stringify({ + '_NOTE_': 'This file is auto-generated from YAML file. DO NOT EDIT.', + ...jsonContent, + }), 'utf-8'); console.log(`✓ ${ymlPath} → ${jsonPath}`); } @@ -53,4 +56,4 @@ if (process.env.MISSKEY_CONFIG_YML) { convertYamlToJson(customYmlPath, customJsonPath); } -console.log('設定ファイルの変換が完了しました'); +console.log('Configuration compiled');