mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-27 03:54:57 +02:00
UBER-810 Add mixin attribute tool script (#3648)
Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
@@ -54,6 +54,7 @@ import { openAIConfigDefaults } from '@hcengineering/openai'
|
||||
import { benchmark } from './benchmark'
|
||||
import { cleanArchivedSpaces, cleanRemovedTransactions, cleanWorkspace, fixCommentDoubleIdCreate } from './clean'
|
||||
import { changeConfiguration } from './configuration'
|
||||
import { fixMixinForeignAttributes, showMixinForeignAttributes } from './mixin'
|
||||
import { openAIConfig } from './openai'
|
||||
|
||||
/**
|
||||
@@ -467,6 +468,26 @@ export function devTool (
|
||||
await fixCommentDoubleIdCreate(getWorkspaceId(workspace, productId), transactorUrl)
|
||||
})
|
||||
|
||||
program
|
||||
.command('mixin-show-foreign-attributes <workspace>')
|
||||
.description('mixin-show-foreign-attributes')
|
||||
.option('--mixin <mixin>', 'Mixin class', '')
|
||||
.option('--property <property>', 'Property name', '')
|
||||
.option('--detail <detail>', 'Show details', false)
|
||||
.action(async (workspace: string, cmd: { detail: boolean, mixin: string, property: string }) => {
|
||||
await showMixinForeignAttributes(getWorkspaceId(workspace, productId), transactorUrl, cmd)
|
||||
})
|
||||
|
||||
program
|
||||
.command('mixin-fix-foreign-attributes <workspace>')
|
||||
.description('mixin-fix-foreign-attributes')
|
||||
.option('--mixin <mixin>', 'Mixin class', '')
|
||||
.option('--property <property>', 'Property name', '')
|
||||
.action(async (workspace: string, cmd: { mixin: string, property: string }) => {
|
||||
const { mongodbUri } = prepareTools()
|
||||
await fixMixinForeignAttributes(mongodbUri, getWorkspaceId(workspace, productId), transactorUrl, cmd)
|
||||
})
|
||||
|
||||
program
|
||||
.command('configure <workspace>')
|
||||
.description('clean archived spaces')
|
||||
|
||||
Reference in New Issue
Block a user