From 07ac3e87cefecd462a690ff83c69cd12d5e70afc Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Thu, 30 May 2024 11:47:47 +0800 Subject: [PATCH] chore: update translate cli (#5906) * chore: update translate cli * chore: add changeset --- .changeset/shaggy-tables-taste.md | 5 +++++ packages/cli/src/commands/translate/sync-keys/utils.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/shaggy-tables-taste.md diff --git a/.changeset/shaggy-tables-taste.md b/.changeset/shaggy-tables-taste.md new file mode 100644 index 000000000..545b59e06 --- /dev/null +++ b/.changeset/shaggy-tables-taste.md @@ -0,0 +1,5 @@ +--- +"@logto/cli": patch +--- + +fix the translate CLI command by adding the missing import diff --git a/packages/cli/src/commands/translate/sync-keys/utils.ts b/packages/cli/src/commands/translate/sync-keys/utils.ts index c2e7afe15..1bbd77607 100644 --- a/packages/cli/src/commands/translate/sync-keys/utils.ts +++ b/packages/cli/src/commands/translate/sync-keys/utils.ts @@ -259,7 +259,10 @@ const traverseNode = async ( await fs.writeFile(targetFilePath, '', { flag: 'w+' }); if (isRoot) { - await fs.appendFile(targetFilePath, "import type { LocalePhrase } from '../../types.js';\n\n"); + await fs.appendFile( + targetFilePath, + "import { type DeepPartial } from '@silverhand/essentials';\n\nimport type { LocalePhrase } from '../../types.js';\n\n" + ); } // Write imports first