Files
speckle-server/packages/server/modules/cli/commands/download/project.ts
T
Kristaps Fabians Geikins 951d86aa3e feat(server): cross-server onboarding stream sync + DL project CLI command (#1717)
* WIP

* cleanup and sync MVP kinda done

* WIP

* logging improved a bit

* fixed version sorting

* onboarding base stream creation works

* moved onboarding stream to use new base
2023-07-31 11:44:39 +03:00

37 lines
939 B
TypeScript

import { CommandModule } from 'yargs'
import { cliLogger } from '@/logging/logging'
import { downloadProject } from '@/modules/cross-server-sync/services/project'
const command: CommandModule<
unknown,
{
projectUrl: string
authorId: string
syncComments: boolean
}
> = {
command: 'project <projectUrl> <authorId> [syncComments]',
describe: 'Download a project from an external Speckle server instance',
builder: {
projectUrl: {
describe:
'Public Project URL (e.g. https://latest.speckle.systems/projects/594d657cdd)',
type: 'string'
},
authorId: {
describe: 'ID of the local user that will own the project',
type: 'string'
},
syncComments: {
describe: 'Whether or not to sync comments as well',
type: 'boolean',
default: true
}
},
handler: async (argv) => {
await downloadProject(argv, { logger: cliLogger })
}
}
export = command