0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-13 21:30:30 -05:00

chore: update translate cli (#5906)

* chore: update translate cli

* chore: add changeset
This commit is contained in:
Charles Zhao 2024-05-30 11:47:47 +08:00 committed by GitHub
parent 4b75860233
commit 07ac3e87ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@logto/cli": patch
---
fix the translate CLI command by adding the missing import

View file

@ -259,7 +259,10 @@ const traverseNode = async (
await fs.writeFile(targetFilePath, '', { flag: 'w+' }); await fs.writeFile(targetFilePath, '', { flag: 'w+' });
if (isRoot) { 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 // Write imports first