Files
speckle-server/packages/server/modules/cli/commands/download/project.ts
T
Kristaps Fabians Geikins 94b0b5f5e0 fix(server): cross server sync not respecting token (#2181)
* fix(server): cross server sync not respecting token

* minor adjustment

* getting rid of token positional arg
2024-03-29 15:21:06 +02:00

42 lines
1.0 KiB
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
token?: string
}
> = {
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
},
token: {
describe: 'Target server auth token, in case the stream is private',
type: 'string'
}
},
handler: async (argv) => {
await downloadProject(argv, { logger: cliLogger })
}
}
export = command