mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-08 00:37:42 +00: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 serverToken, { decodeToken, generateToken } from '@hcengineering/server-token'
|
||||||
import toolPlugin, { FileModelLogger } from '@hcengineering/server-tool'
|
import toolPlugin, { FileModelLogger } from '@hcengineering/server-tool'
|
||||||
|
|
||||||
import { program } from 'commander'
|
import { program, Command } from 'commander'
|
||||||
import { Db, MongoClient } from 'mongodb'
|
import { Db, MongoClient } from 'mongodb'
|
||||||
import { clearTelegramHistory } from './telegram'
|
import { clearTelegramHistory } from './telegram'
|
||||||
import { diffWorkspace } from './workspace'
|
import { diffWorkspace } from './workspace'
|
||||||
@ -78,7 +78,8 @@ export function devTool (
|
|||||||
version: Data<Version>
|
version: Data<Version>
|
||||||
migrateOperations: [string, MigrateOperation][]
|
migrateOperations: [string, MigrateOperation][]
|
||||||
},
|
},
|
||||||
productId: string
|
productId: string,
|
||||||
|
extendProgram?: (prog: Command) => void
|
||||||
): void {
|
): void {
|
||||||
const serverSecret = process.env.SERVER_SECRET
|
const serverSecret = process.env.SERVER_SECRET
|
||||||
if (serverSecret === undefined) {
|
if (serverSecret === undefined) {
|
||||||
@ -603,5 +604,7 @@ export function devTool (
|
|||||||
await fixSkills(mongodbUri, getWorkspaceId(workspace, productId), transactorUrl, step)
|
await fixSkills(mongodbUri, getWorkspaceId(workspace, productId), transactorUrl, step)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
extendProgram?.(program)
|
||||||
|
|
||||||
program.parse(process.argv)
|
program.parse(process.argv)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user