mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
ezqms-538: allow command contributions to dev tool (#4440)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
cf2df6ffe4
commit
136134de60
@ -43,7 +43,7 @@ import {
|
||||
import serverToken, { decodeToken, generateToken } from '@hcengineering/server-token'
|
||||
import toolPlugin, { FileModelLogger } from '@hcengineering/server-tool'
|
||||
|
||||
import { program } from 'commander'
|
||||
import { program, Command } from 'commander'
|
||||
import { Db, MongoClient } from 'mongodb'
|
||||
import { clearTelegramHistory } from './telegram'
|
||||
import { diffWorkspace } from './workspace'
|
||||
@ -78,7 +78,8 @@ export function devTool (
|
||||
version: Data<Version>
|
||||
migrateOperations: [string, MigrateOperation][]
|
||||
},
|
||||
productId: string
|
||||
productId: string,
|
||||
extendProgram?: (prog: Command) => void
|
||||
): void {
|
||||
const serverSecret = process.env.SERVER_SECRET
|
||||
if (serverSecret === undefined) {
|
||||
@ -603,5 +604,7 @@ export function devTool (
|
||||
await fixSkills(mongodbUri, getWorkspaceId(workspace, productId), transactorUrl, step)
|
||||
})
|
||||
|
||||
extendProgram?.(program)
|
||||
|
||||
program.parse(process.argv)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user