mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-08 21:27:45 +03:00
Configure all tool (#5080)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
a5d51a7fd1
commit
c8b8f9f657
@ -690,6 +690,25 @@ export function devTool (
|
||||
await changeConfiguration(getWorkspaceId(workspace, productId), transactorUrl, cmd)
|
||||
})
|
||||
|
||||
program
|
||||
.command('configure-all')
|
||||
.description('configure all spaces')
|
||||
.option('--enable <enable>', 'Enable plugin configuration', '')
|
||||
.option('--disable <disable>', 'Disable plugin configuration', '')
|
||||
.option('--list', 'List plugin states', false)
|
||||
.action(async (cmd: { enable: string, disable: string, list: boolean }) => {
|
||||
const { mongodbUri } = prepareTools()
|
||||
await withDatabase(mongodbUri, async (db) => {
|
||||
console.log('configure all workspaces')
|
||||
console.log(JSON.stringify(cmd))
|
||||
const workspaces = await listWorkspacesRaw(db, productId)
|
||||
for (const ws of workspaces) {
|
||||
console.log('configure', ws.workspaceName ?? ws.workspace)
|
||||
await changeConfiguration(getWorkspaceId(ws.workspaceUrl ?? ws.workspace, productId), transactorUrl, cmd)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
program
|
||||
.command('optimize-model <workspace>')
|
||||
.description('optimize model')
|
||||
|
Loading…
Reference in New Issue
Block a user