Add json markup tool (#5511)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2024-05-04 20:14:14 +05:00
committed by GitHub
parent 4bc1534ee0
commit bb29cebdd9
4 changed files with 129 additions and 4 deletions
+9
View File
@@ -82,6 +82,7 @@ import { changeConfiguration } from './configuration'
import { fixMixinForeignAttributes, showMixinForeignAttributes } from './mixin'
import { openAIConfig } from './openai'
import { fixAccountEmails, renameAccount } from './renameAccount'
import { fixJsonMarkup } from './markup'
const colorConstants = {
colorRed: '\u001b[31m',
@@ -881,6 +882,14 @@ export function devTool (
}
)
program
.command('fix-json-markup <workspace>')
.description('fixes double converted json markup')
.action(async (workspace: string) => {
const { mongodbUri, storageAdapter } = prepareTools()
await fixJsonMarkup(toolCtx, mongodbUri, storageAdapter, getWorkspaceId(workspace, productId), transactorUrl)
})
extendProgram?.(program)
program.parse(process.argv)