@doist/todoist-cli 1.31.0 → 1.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/commands/auth/helpers.d.ts +4 -0
- package/dist/commands/auth/helpers.d.ts.map +1 -0
- package/dist/commands/auth/helpers.js +31 -0
- package/dist/commands/auth/helpers.js.map +1 -0
- package/dist/commands/{auth.d.ts → auth/index.d.ts} +1 -1
- package/dist/commands/auth/index.d.ts.map +1 -0
- package/dist/commands/auth/index.js +17 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/auth/login.d.ts +2 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +30 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +2 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +9 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/status.d.ts +4 -0
- package/dist/commands/auth/status.d.ts.map +1 -0
- package/dist/commands/auth/status.js +39 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/auth/token.d.ts +2 -0
- package/dist/commands/auth/token.d.ts.map +1 -0
- package/dist/commands/auth/token.js +17 -0
- package/dist/commands/auth/token.js.map +1 -0
- package/dist/commands/changelog.js +1 -1
- package/dist/commands/changelog.js.map +1 -1
- package/dist/commands/comment/add.d.ts +11 -0
- package/dist/commands/comment/add.d.ts.map +1 -0
- package/dist/commands/comment/add.js +71 -0
- package/dist/commands/comment/add.js.map +1 -0
- package/dist/commands/comment/browse.d.ts +2 -0
- package/dist/commands/comment/browse.d.ts.map +1 -0
- package/dist/commands/comment/browse.js +19 -0
- package/dist/commands/comment/browse.js.map +1 -0
- package/dist/commands/comment/delete.d.ts +5 -0
- package/dist/commands/comment/delete.d.ts.map +1 -0
- package/dist/commands/comment/delete.js +21 -0
- package/dist/commands/comment/delete.js.map +1 -0
- package/dist/commands/comment/helpers.d.ts +2 -0
- package/dist/commands/comment/helpers.d.ts.map +1 -0
- package/dist/commands/comment/helpers.js +7 -0
- package/dist/commands/comment/helpers.js.map +1 -0
- package/dist/commands/{comment.d.ts → comment/index.d.ts} +1 -1
- package/dist/commands/comment/index.d.ts.map +1 -0
- package/dist/commands/comment/index.js +91 -0
- package/dist/commands/comment/index.js.map +1 -0
- package/dist/commands/comment/list.d.ts +8 -0
- package/dist/commands/comment/list.d.ts.map +1 -0
- package/dist/commands/comment/list.js +63 -0
- package/dist/commands/comment/list.js.map +1 -0
- package/dist/commands/comment/update.d.ts +6 -0
- package/dist/commands/comment/update.d.ts.map +1 -0
- package/dist/commands/comment/update.js +22 -0
- package/dist/commands/comment/update.js.map +1 -0
- package/dist/commands/comment/view.d.ts +3 -0
- package/dist/commands/comment/view.d.ts.map +1 -0
- package/dist/commands/comment/view.js +40 -0
- package/dist/commands/comment/view.js.map +1 -0
- package/dist/commands/completion/helpers.d.ts +13 -0
- package/dist/commands/completion/helpers.d.ts.map +1 -0
- package/dist/commands/completion/helpers.js +26 -0
- package/dist/commands/completion/helpers.js.map +1 -0
- package/dist/commands/{completion.d.ts → completion/index.d.ts} +1 -1
- package/dist/commands/completion/index.d.ts.map +1 -0
- package/dist/commands/completion/index.js +28 -0
- package/dist/commands/completion/index.js.map +1 -0
- package/dist/commands/completion/install.d.ts +2 -0
- package/dist/commands/completion/install.d.ts.map +1 -0
- package/dist/commands/completion/install.js +16 -0
- package/dist/commands/completion/install.js.map +1 -0
- package/dist/commands/completion/server.d.ts +3 -0
- package/dist/commands/completion/server.d.ts.map +1 -0
- package/dist/commands/completion/server.js +35 -0
- package/dist/commands/completion/server.js.map +1 -0
- package/dist/commands/completion/uninstall.d.ts +2 -0
- package/dist/commands/completion/uninstall.d.ts.map +1 -0
- package/dist/commands/completion/uninstall.js +19 -0
- package/dist/commands/completion/uninstall.js.map +1 -0
- package/dist/commands/filter/browse.d.ts +2 -0
- package/dist/commands/filter/browse.d.ts.map +1 -0
- package/dist/commands/filter/browse.js +8 -0
- package/dist/commands/filter/browse.js.map +1 -0
- package/dist/commands/filter/create.d.ts +11 -0
- package/dist/commands/filter/create.d.ts.map +1 -0
- package/dist/commands/filter/create.js +28 -0
- package/dist/commands/filter/create.js.map +1 -0
- package/dist/commands/filter/delete.d.ts +5 -0
- package/dist/commands/filter/delete.d.ts.map +1 -0
- package/dist/commands/filter/delete.js +20 -0
- package/dist/commands/filter/delete.js.map +1 -0
- package/dist/commands/filter/helpers.d.ts +3 -0
- package/dist/commands/filter/helpers.d.ts.map +1 -0
- package/dist/commands/filter/helpers.js +33 -0
- package/dist/commands/filter/helpers.js.map +1 -0
- package/dist/commands/filter/index.d.ts +4 -0
- package/dist/commands/filter/index.d.ts.map +1 -0
- package/dist/commands/filter/index.js +91 -0
- package/dist/commands/filter/index.js.map +1 -0
- package/dist/commands/filter/list.d.ts +3 -0
- package/dist/commands/filter/list.d.ts.map +1 -0
- package/dist/commands/filter/list.js +31 -0
- package/dist/commands/filter/list.js.map +1 -0
- package/dist/commands/filter/update.d.ts +10 -0
- package/dist/commands/filter/update.d.ts.map +1 -0
- package/dist/commands/filter/update.js +31 -0
- package/dist/commands/filter/update.js.map +1 -0
- package/dist/commands/filter/view.d.ts +3 -0
- package/dist/commands/filter/view.d.ts.map +1 -0
- package/dist/commands/filter/view.js +77 -0
- package/dist/commands/filter/view.js.map +1 -0
- package/dist/commands/label/browse.d.ts +2 -0
- package/dist/commands/label/browse.d.ts.map +1 -0
- package/dist/commands/label/browse.js +8 -0
- package/dist/commands/label/browse.js.map +1 -0
- package/dist/commands/label/create.d.ts +10 -0
- package/dist/commands/label/create.d.ts.map +1 -0
- package/dist/commands/label/create.js +26 -0
- package/dist/commands/label/create.js.map +1 -0
- package/dist/commands/label/delete.d.ts +5 -0
- package/dist/commands/label/delete.d.ts.map +1 -0
- package/dist/commands/label/delete.js +19 -0
- package/dist/commands/label/delete.js.map +1 -0
- package/dist/commands/label/helpers.d.ts +8 -0
- package/dist/commands/label/helpers.d.ts.map +1 -0
- package/dist/commands/label/helpers.js +62 -0
- package/dist/commands/label/helpers.js.map +1 -0
- package/dist/commands/label/index.d.ts +4 -0
- package/dist/commands/label/index.d.ts.map +1 -0
- package/dist/commands/label/index.js +90 -0
- package/dist/commands/label/index.js.map +1 -0
- package/dist/commands/label/list.d.ts +3 -0
- package/dist/commands/label/list.d.ts.map +1 -0
- package/dist/commands/label/list.js +52 -0
- package/dist/commands/label/list.js.map +1 -0
- package/dist/commands/label/update.d.ts +10 -0
- package/dist/commands/label/update.d.ts.map +1 -0
- package/dist/commands/label/update.js +35 -0
- package/dist/commands/label/update.js.map +1 -0
- package/dist/commands/label/view.d.ts +3 -0
- package/dist/commands/label/view.d.ts.map +1 -0
- package/dist/commands/label/view.js +70 -0
- package/dist/commands/label/view.js.map +1 -0
- package/dist/commands/notification/accept.d.ts +2 -0
- package/dist/commands/notification/accept.d.ts.map +1 -0
- package/dist/commands/notification/accept.js +16 -0
- package/dist/commands/notification/accept.js.map +1 -0
- package/dist/commands/notification/helpers.d.ts +6 -0
- package/dist/commands/notification/helpers.d.ts.map +1 -0
- package/dist/commands/notification/helpers.js +78 -0
- package/dist/commands/notification/helpers.js.map +1 -0
- package/dist/commands/{notification.d.ts → notification/index.d.ts} +1 -1
- package/dist/commands/notification/index.d.ts.map +1 -0
- package/dist/commands/notification/index.js +69 -0
- package/dist/commands/notification/index.js.map +1 -0
- package/dist/commands/notification/list.d.ts +10 -0
- package/dist/commands/notification/list.d.ts.map +1 -0
- package/dist/commands/notification/list.js +61 -0
- package/dist/commands/notification/list.js.map +1 -0
- package/dist/commands/notification/read.d.ts +7 -0
- package/dist/commands/notification/read.d.ts.map +1 -0
- package/dist/commands/notification/read.js +23 -0
- package/dist/commands/notification/read.js.map +1 -0
- package/dist/commands/notification/reject.d.ts +2 -0
- package/dist/commands/notification/reject.d.ts.map +1 -0
- package/dist/commands/notification/reject.js +16 -0
- package/dist/commands/notification/reject.js.map +1 -0
- package/dist/commands/notification/unread.d.ts +2 -0
- package/dist/commands/notification/unread.d.ts.map +1 -0
- package/dist/commands/notification/unread.js +8 -0
- package/dist/commands/notification/unread.js.map +1 -0
- package/dist/commands/notification/view.d.ts +3 -0
- package/dist/commands/notification/view.d.ts.map +1 -0
- package/dist/commands/notification/view.js +31 -0
- package/dist/commands/notification/view.js.map +1 -0
- package/dist/commands/project/activity-stats.d.ts +6 -0
- package/dist/commands/project/activity-stats.d.ts.map +1 -0
- package/dist/commands/project/activity-stats.js +41 -0
- package/dist/commands/project/activity-stats.js.map +1 -0
- package/dist/commands/project/analyze-health.d.ts +5 -0
- package/dist/commands/project/analyze-health.d.ts.map +1 -0
- package/dist/commands/project/analyze-health.js +20 -0
- package/dist/commands/project/analyze-health.js.map +1 -0
- package/dist/commands/project/archive.d.ts +4 -0
- package/dist/commands/project/archive.d.ts.map +1 -0
- package/dist/commands/project/archive.js +14 -0
- package/dist/commands/project/archive.js.map +1 -0
- package/dist/commands/project/archived-count.d.ts +6 -0
- package/dist/commands/project/archived-count.d.ts.map +1 -0
- package/dist/commands/project/archived-count.js +26 -0
- package/dist/commands/project/archived-count.js.map +1 -0
- package/dist/commands/project/browse.d.ts +2 -0
- package/dist/commands/project/browse.d.ts.map +1 -0
- package/dist/commands/project/browse.js +10 -0
- package/dist/commands/project/browse.js.map +1 -0
- package/dist/commands/project/collaborators.d.ts +2 -0
- package/dist/commands/project/collaborators.d.ts.map +1 -0
- package/dist/commands/project/collaborators.js +48 -0
- package/dist/commands/project/collaborators.js.map +1 -0
- package/dist/commands/project/create.d.ts +12 -0
- package/dist/commands/project/create.d.ts.map +1 -0
- package/dist/commands/project/create.js +39 -0
- package/dist/commands/project/create.js.map +1 -0
- package/dist/commands/project/delete.d.ts +5 -0
- package/dist/commands/project/delete.d.ts.map +1 -0
- package/dist/commands/project/delete.js +23 -0
- package/dist/commands/project/delete.js.map +1 -0
- package/dist/commands/project/health-context.d.ts +4 -0
- package/dist/commands/project/health-context.d.ts.map +1 -0
- package/dist/commands/project/health-context.js +44 -0
- package/dist/commands/project/health-context.js.map +1 -0
- package/dist/commands/project/health.d.ts +4 -0
- package/dist/commands/project/health.d.ts.map +1 -0
- package/dist/commands/project/health.js +39 -0
- package/dist/commands/project/health.js.map +1 -0
- package/dist/commands/project/helpers.d.ts +3 -0
- package/dist/commands/project/helpers.d.ts.map +1 -0
- package/dist/commands/project/helpers.js +2 -0
- package/dist/commands/project/helpers.js.map +1 -0
- package/dist/commands/project/index.d.ts +4 -0
- package/dist/commands/project/index.d.ts.map +1 -0
- package/dist/commands/project/index.js +239 -0
- package/dist/commands/project/index.js.map +1 -0
- package/dist/commands/project/join.d.ts +5 -0
- package/dist/commands/project/join.d.ts.map +1 -0
- package/dist/commands/project/join.js +20 -0
- package/dist/commands/project/join.js.map +1 -0
- package/dist/commands/project/list.d.ts +7 -0
- package/dist/commands/project/list.d.ts.map +1 -0
- package/dist/commands/project/list.js +109 -0
- package/dist/commands/project/list.js.map +1 -0
- package/dist/commands/project/move.d.ts +10 -0
- package/dist/commands/project/move.d.ts.map +1 -0
- package/dist/commands/project/move.js +79 -0
- package/dist/commands/project/move.js.map +1 -0
- package/dist/commands/project/permissions.d.ts +4 -0
- package/dist/commands/project/permissions.d.ts.map +1 -0
- package/dist/commands/project/permissions.js +34 -0
- package/dist/commands/project/permissions.js.map +1 -0
- package/dist/commands/project/progress.d.ts +4 -0
- package/dist/commands/project/progress.d.ts.map +1 -0
- package/dist/commands/project/progress.js +20 -0
- package/dist/commands/project/progress.js.map +1 -0
- package/dist/commands/project/unarchive.d.ts +4 -0
- package/dist/commands/project/unarchive.d.ts.map +1 -0
- package/dist/commands/project/unarchive.js +14 -0
- package/dist/commands/project/unarchive.js.map +1 -0
- package/dist/commands/project/update.d.ts +11 -0
- package/dist/commands/project/update.d.ts.map +1 -0
- package/dist/commands/project/update.js +38 -0
- package/dist/commands/project/update.js.map +1 -0
- package/dist/commands/project/view.d.ts +5 -0
- package/dist/commands/project/view.d.ts.map +1 -0
- package/dist/commands/project/view.js +151 -0
- package/dist/commands/project/view.js.map +1 -0
- package/dist/commands/reminder/add.d.ts +9 -0
- package/dist/commands/reminder/add.d.ts.map +1 -0
- package/dist/commands/reminder/add.js +87 -0
- package/dist/commands/reminder/add.js.map +1 -0
- package/dist/commands/reminder/delete.d.ts +7 -0
- package/dist/commands/reminder/delete.d.ts.map +1 -0
- package/dist/commands/reminder/delete.js +27 -0
- package/dist/commands/reminder/delete.js.map +1 -0
- package/dist/commands/reminder/helpers.d.ts +4 -0
- package/dist/commands/reminder/helpers.d.ts.map +1 -0
- package/dist/commands/reminder/helpers.js +35 -0
- package/dist/commands/reminder/helpers.js.map +1 -0
- package/dist/commands/{reminder.d.ts → reminder/index.d.ts} +1 -1
- package/dist/commands/reminder/index.d.ts.map +1 -0
- package/dist/commands/reminder/index.js +70 -0
- package/dist/commands/reminder/index.js.map +1 -0
- package/dist/commands/reminder/list.d.ts +3 -0
- package/dist/commands/reminder/list.d.ts.map +1 -0
- package/dist/commands/reminder/list.js +29 -0
- package/dist/commands/reminder/list.js.map +1 -0
- package/dist/commands/reminder/update.d.ts +8 -0
- package/dist/commands/reminder/update.d.ts.map +1 -0
- package/dist/commands/reminder/update.js +50 -0
- package/dist/commands/reminder/update.js.map +1 -0
- package/dist/commands/section/archive.d.ts +4 -0
- package/dist/commands/section/archive.d.ts.map +1 -0
- package/dist/commands/section/archive.js +15 -0
- package/dist/commands/section/archive.js.map +1 -0
- package/dist/commands/section/browse.d.ts +2 -0
- package/dist/commands/section/browse.d.ts.map +1 -0
- package/dist/commands/section/browse.js +8 -0
- package/dist/commands/section/browse.js.map +1 -0
- package/dist/commands/section/create.d.ts +9 -0
- package/dist/commands/section/create.d.ts.map +1 -0
- package/dist/commands/section/create.js +26 -0
- package/dist/commands/section/create.js.map +1 -0
- package/dist/commands/section/delete.d.ts +5 -0
- package/dist/commands/section/delete.d.ts.map +1 -0
- package/dist/commands/section/delete.js +24 -0
- package/dist/commands/section/delete.js.map +1 -0
- package/dist/commands/{section.d.ts → section/index.d.ts} +1 -1
- package/dist/commands/section/index.d.ts.map +1 -0
- package/dist/commands/section/index.js +103 -0
- package/dist/commands/section/index.js.map +1 -0
- package/dist/commands/section/list.d.ts +3 -0
- package/dist/commands/section/list.d.ts.map +1 -0
- package/dist/commands/section/list.js +37 -0
- package/dist/commands/section/list.js.map +1 -0
- package/dist/commands/section/unarchive.d.ts +4 -0
- package/dist/commands/section/unarchive.d.ts.map +1 -0
- package/dist/commands/section/unarchive.js +15 -0
- package/dist/commands/section/unarchive.js.map +1 -0
- package/dist/commands/section/update.d.ts +6 -0
- package/dist/commands/section/update.d.ts.map +1 -0
- package/dist/commands/section/update.js +20 -0
- package/dist/commands/section/update.js.map +1 -0
- package/dist/commands/settings/helpers.d.ts +29 -0
- package/dist/commands/settings/helpers.d.ts.map +1 -0
- package/dist/commands/settings/helpers.js +183 -0
- package/dist/commands/settings/helpers.js.map +1 -0
- package/dist/commands/settings/index.d.ts +4 -0
- package/dist/commands/settings/index.d.ts.map +1 -0
- package/dist/commands/settings/index.js +46 -0
- package/dist/commands/settings/index.js.map +1 -0
- package/dist/commands/settings/update.d.ts +18 -0
- package/dist/commands/settings/update.d.ts.map +1 -0
- package/dist/commands/settings/update.js +52 -0
- package/dist/commands/settings/update.js.map +1 -0
- package/dist/commands/settings/view.d.ts +3 -0
- package/dist/commands/settings/view.d.ts.map +1 -0
- package/dist/commands/settings/view.js +44 -0
- package/dist/commands/settings/view.js.map +1 -0
- package/dist/commands/{skill.d.ts → skill/index.d.ts} +1 -1
- package/dist/commands/skill/index.d.ts.map +1 -0
- package/dist/commands/skill/index.js +46 -0
- package/dist/commands/skill/index.js.map +1 -0
- package/dist/commands/skill/install.d.ts +6 -0
- package/dist/commands/skill/install.d.ts.map +1 -0
- package/dist/commands/skill/install.js +19 -0
- package/dist/commands/skill/install.js.map +1 -0
- package/dist/commands/skill/list.d.ts +2 -0
- package/dist/commands/skill/list.d.ts.map +1 -0
- package/dist/commands/skill/list.js +23 -0
- package/dist/commands/skill/list.js.map +1 -0
- package/dist/commands/skill/uninstall.d.ts +5 -0
- package/dist/commands/skill/uninstall.d.ts.map +1 -0
- package/dist/commands/skill/uninstall.js +16 -0
- package/dist/commands/skill/uninstall.js.map +1 -0
- package/dist/commands/skill/update.d.ts +6 -0
- package/dist/commands/skill/update.d.ts.map +1 -0
- package/dist/commands/skill/update.js +39 -0
- package/dist/commands/skill/update.js.map +1 -0
- package/dist/commands/stats/goals.d.ts +8 -0
- package/dist/commands/stats/goals.d.ts.map +1 -0
- package/dist/commands/stats/goals.js +26 -0
- package/dist/commands/stats/goals.js.map +1 -0
- package/dist/commands/stats/helpers.d.ts +9 -0
- package/dist/commands/stats/helpers.d.ts.map +1 -0
- package/dist/commands/{stats.js → stats/helpers.js} +8 -72
- package/dist/commands/stats/helpers.js.map +1 -0
- package/dist/commands/{stats.d.ts → stats/index.d.ts} +1 -1
- package/dist/commands/stats/index.d.ts.map +1 -0
- package/dist/commands/stats/index.js +24 -0
- package/dist/commands/stats/index.js.map +1 -0
- package/dist/commands/stats/vacation.d.ts +8 -0
- package/dist/commands/stats/vacation.d.ts.map +1 -0
- package/dist/commands/stats/vacation.js +13 -0
- package/dist/commands/stats/vacation.js.map +1 -0
- package/dist/commands/stats/view.d.ts +3 -0
- package/dist/commands/stats/view.d.ts.map +1 -0
- package/dist/commands/stats/view.js +11 -0
- package/dist/commands/stats/view.js.map +1 -0
- package/dist/commands/task/add.d.ts +20 -0
- package/dist/commands/task/add.d.ts.map +1 -0
- package/dist/commands/task/add.js +112 -0
- package/dist/commands/task/add.js.map +1 -0
- package/dist/commands/task/browse.d.ts +2 -0
- package/dist/commands/task/browse.d.ts.map +1 -0
- package/dist/commands/task/browse.js +10 -0
- package/dist/commands/task/browse.js.map +1 -0
- package/dist/commands/task/complete.d.ts +5 -0
- package/dist/commands/task/complete.d.ts.map +1 -0
- package/dist/commands/task/complete.js +34 -0
- package/dist/commands/task/complete.js.map +1 -0
- package/dist/commands/task/delete.d.ts +5 -0
- package/dist/commands/task/delete.d.ts.map +1 -0
- package/dist/commands/task/delete.js +19 -0
- package/dist/commands/task/delete.js.map +1 -0
- package/dist/commands/task/helpers.d.ts +6 -0
- package/dist/commands/task/helpers.d.ts.map +1 -0
- package/dist/commands/task/helpers.js +13 -0
- package/dist/commands/task/helpers.js.map +1 -0
- package/dist/commands/task/index.d.ts +4 -0
- package/dist/commands/task/index.d.ts.map +1 -0
- package/dist/commands/task/index.js +197 -0
- package/dist/commands/task/index.js.map +1 -0
- package/dist/commands/task/list.d.ts +6 -0
- package/dist/commands/task/list.d.ts.map +1 -0
- package/dist/commands/task/list.js +19 -0
- package/dist/commands/task/list.js.map +1 -0
- package/dist/commands/task/move.d.ts +8 -0
- package/dist/commands/task/move.d.ts.map +1 -0
- package/dist/commands/task/move.js +51 -0
- package/dist/commands/task/move.js.map +1 -0
- package/dist/commands/task/reschedule.d.ts +5 -0
- package/dist/commands/task/reschedule.d.ts.map +1 -0
- package/dist/commands/task/reschedule.js +36 -0
- package/dist/commands/task/reschedule.js.map +1 -0
- package/dist/commands/task/uncomplete.d.ts +4 -0
- package/dist/commands/task/uncomplete.d.ts.map +1 -0
- package/dist/commands/task/uncomplete.js +14 -0
- package/dist/commands/task/uncomplete.js.map +1 -0
- package/dist/commands/task/update.d.ts +19 -0
- package/dist/commands/task/update.d.ts.map +1 -0
- package/dist/commands/task/update.js +82 -0
- package/dist/commands/task/update.js.map +1 -0
- package/dist/commands/task/view.d.ts +3 -0
- package/dist/commands/task/view.d.ts.map +1 -0
- package/dist/commands/task/view.js +28 -0
- package/dist/commands/task/view.js.map +1 -0
- package/dist/commands/view.js +4 -4
- package/dist/commands/view.js.map +1 -1
- package/dist/commands/workspace/helpers.d.ts +2 -0
- package/dist/commands/workspace/helpers.d.ts.map +1 -0
- package/dist/commands/workspace/helpers.js +2 -0
- package/dist/commands/workspace/helpers.js.map +1 -0
- package/dist/commands/{workspace.d.ts → workspace/index.d.ts} +1 -1
- package/dist/commands/workspace/index.d.ts.map +1 -0
- package/dist/commands/workspace/index.js +89 -0
- package/dist/commands/workspace/index.js.map +1 -0
- package/dist/commands/workspace/insights.d.ts +5 -0
- package/dist/commands/workspace/insights.d.ts.map +1 -0
- package/dist/commands/workspace/insights.js +54 -0
- package/dist/commands/workspace/insights.js.map +1 -0
- package/dist/commands/workspace/list.d.ts +3 -0
- package/dist/commands/workspace/list.d.ts.map +1 -0
- package/dist/commands/workspace/list.js +47 -0
- package/dist/commands/workspace/list.js.map +1 -0
- package/dist/commands/workspace/projects.d.ts +3 -0
- package/dist/commands/workspace/projects.d.ts.map +1 -0
- package/dist/commands/workspace/projects.js +97 -0
- package/dist/commands/workspace/projects.js.map +1 -0
- package/dist/commands/workspace/users.d.ts +5 -0
- package/dist/commands/workspace/users.d.ts.map +1 -0
- package/dist/commands/workspace/users.js +93 -0
- package/dist/commands/workspace/users.js.map +1 -0
- package/dist/commands/workspace/view.d.ts +2 -0
- package/dist/commands/workspace/view.d.ts.map +1 -0
- package/dist/commands/workspace/view.js +17 -0
- package/dist/commands/workspace/view.js.map +1 -0
- package/dist/index.js +17 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/commands/auth.d.ts.map +0 -1
- package/dist/commands/auth.js +0 -124
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/comment.d.ts.map +0 -1
- package/dist/commands/comment.js +0 -301
- package/dist/commands/comment.js.map +0 -1
- package/dist/commands/completion.d.ts.map +0 -1
- package/dist/commands/completion.js +0 -107
- package/dist/commands/completion.js.map +0 -1
- package/dist/commands/filter.d.ts +0 -5
- package/dist/commands/filter.d.ts.map +0 -1
- package/dist/commands/filter.js +0 -287
- package/dist/commands/filter.js.map +0 -1
- package/dist/commands/label.d.ts +0 -5
- package/dist/commands/label.d.ts.map +0 -1
- package/dist/commands/label.js +0 -328
- package/dist/commands/label.js.map +0 -1
- package/dist/commands/notification.d.ts.map +0 -1
- package/dist/commands/notification.js +0 -274
- package/dist/commands/notification.js.map +0 -1
- package/dist/commands/project.d.ts +0 -7
- package/dist/commands/project.d.ts.map +0 -1
- package/dist/commands/project.js +0 -912
- package/dist/commands/project.js.map +0 -1
- package/dist/commands/reminder.d.ts.map +0 -1
- package/dist/commands/reminder.js +0 -271
- package/dist/commands/reminder.js.map +0 -1
- package/dist/commands/section.d.ts.map +0 -1
- package/dist/commands/section.js +0 -216
- package/dist/commands/section.js.map +0 -1
- package/dist/commands/settings.d.ts +0 -12
- package/dist/commands/settings.d.ts.map +0 -1
- package/dist/commands/settings.js +0 -312
- package/dist/commands/settings.js.map +0 -1
- package/dist/commands/skill.d.ts.map +0 -1
- package/dist/commands/skill.js +0 -127
- package/dist/commands/skill.js.map +0 -1
- package/dist/commands/stats.d.ts.map +0 -1
- package/dist/commands/stats.js.map +0 -1
- package/dist/commands/task.d.ts +0 -5
- package/dist/commands/task.d.ts.map +0 -1
- package/dist/commands/task.js +0 -559
- package/dist/commands/task.js.map +0 -1
- package/dist/commands/workspace.d.ts.map +0 -1
- package/dist/commands/workspace.js +0 -375
- package/dist/commands/workspace.js.map +0 -1
package/dist/commands/project.js
DELETED
|
@@ -1,912 +0,0 @@
|
|
|
1
|
-
import { ProjectVisibilitySchema } from '@doist/todoist-api-typescript';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { Option } from 'commander';
|
|
4
|
-
import { getApi, isPersonalProject, isWorkspaceProject } from '../lib/api/core.js';
|
|
5
|
-
import { fetchWorkspaceFolders, fetchWorkspaces } from '../lib/api/workspaces.js';
|
|
6
|
-
import { openInBrowser } from '../lib/browser.js';
|
|
7
|
-
import { formatUserShortName } from '../lib/collaborators.js';
|
|
8
|
-
import { withCaseInsensitiveChoices } from '../lib/completion.js';
|
|
9
|
-
import { formatError, formatHealthStatus, formatJson, formatNdjson, formatNextCursorFooter, formatPaginatedJson, formatPaginatedNdjson, formatProgressBar, formatTaskRow, isAccessible, printDryRun, } from '../lib/output.js';
|
|
10
|
-
import { LIMITS, paginate } from '../lib/pagination.js';
|
|
11
|
-
import { lenientIdRef, resolveFolderRef, resolveProjectRef, resolveWorkspaceRef, } from '../lib/refs.js';
|
|
12
|
-
import { projectUrl } from '../lib/urls.js';
|
|
13
|
-
const VIEW_STYLE_CHOICES = ['list', 'board', 'calendar'];
|
|
14
|
-
async function listProjects(options) {
|
|
15
|
-
const api = await getApi();
|
|
16
|
-
const targetLimit = options.all
|
|
17
|
-
? Number.MAX_SAFE_INTEGER
|
|
18
|
-
: options.limit
|
|
19
|
-
? parseInt(options.limit, 10)
|
|
20
|
-
: LIMITS.projects;
|
|
21
|
-
const { results: projects, nextCursor } = await paginate((cursor, limit) => api.getProjects({ cursor: cursor ?? undefined, limit }), { limit: targetLimit, startCursor: options.cursor });
|
|
22
|
-
if (options.json) {
|
|
23
|
-
console.log(formatPaginatedJson({ results: projects, nextCursor }, 'project', options.full, options.showUrls));
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (options.ndjson) {
|
|
27
|
-
console.log(formatPaginatedNdjson({ results: projects, nextCursor }, 'project', options.full, options.showUrls));
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (options.personal) {
|
|
31
|
-
const personalOnly = projects.filter((p) => !isWorkspaceProject(p));
|
|
32
|
-
for (const project of personalOnly) {
|
|
33
|
-
const id = chalk.dim(project.id);
|
|
34
|
-
let name = project.isFavorite
|
|
35
|
-
? chalk.yellow(`${project.name}${isAccessible() ? ' ★' : ''}`)
|
|
36
|
-
: project.name;
|
|
37
|
-
if (project.isShared) {
|
|
38
|
-
name = `${name} ${chalk.dim('[shared]')}`;
|
|
39
|
-
}
|
|
40
|
-
console.log(`${id} ${name}`);
|
|
41
|
-
if (options.showUrls) {
|
|
42
|
-
console.log(` ${chalk.dim(projectUrl(project.id))}`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
console.log(formatNextCursorFooter(nextCursor));
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const workspaceProjects = new Map();
|
|
49
|
-
const personalProjects = [];
|
|
50
|
-
for (const project of projects) {
|
|
51
|
-
if (isWorkspaceProject(project)) {
|
|
52
|
-
const list = workspaceProjects.get(project.workspaceId) || [];
|
|
53
|
-
list.push(project);
|
|
54
|
-
workspaceProjects.set(project.workspaceId, list);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
personalProjects.push(project);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
let workspaces = [];
|
|
61
|
-
if (workspaceProjects.size > 0) {
|
|
62
|
-
workspaces = await fetchWorkspaces();
|
|
63
|
-
}
|
|
64
|
-
const workspaceMap = new Map(workspaces.map((w) => [w.id, w]));
|
|
65
|
-
if (personalProjects.length > 0) {
|
|
66
|
-
if (workspaceProjects.size > 0) {
|
|
67
|
-
console.log(chalk.bold('Personal'));
|
|
68
|
-
}
|
|
69
|
-
for (const project of personalProjects) {
|
|
70
|
-
const id = chalk.dim(project.id);
|
|
71
|
-
let name = project.isFavorite
|
|
72
|
-
? chalk.yellow(`${project.name}${isAccessible() ? ' ★' : ''}`)
|
|
73
|
-
: project.name;
|
|
74
|
-
if (project.isShared) {
|
|
75
|
-
name = `${name} ${chalk.dim('[shared]')}`;
|
|
76
|
-
}
|
|
77
|
-
const indent = workspaceProjects.size > 0 ? ' ' : '';
|
|
78
|
-
console.log(`${indent}${id} ${name}`);
|
|
79
|
-
if (options.showUrls) {
|
|
80
|
-
console.log(`${indent} ${chalk.dim(projectUrl(project.id))}`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
if (workspaceProjects.size > 0) {
|
|
84
|
-
console.log('');
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
const sortedWorkspaceIds = [...workspaceProjects.keys()].sort((a, b) => {
|
|
88
|
-
const nameA = workspaceMap.get(a)?.name ?? '';
|
|
89
|
-
const nameB = workspaceMap.get(b)?.name ?? '';
|
|
90
|
-
return nameA.localeCompare(nameB);
|
|
91
|
-
});
|
|
92
|
-
for (const workspaceId of sortedWorkspaceIds) {
|
|
93
|
-
const wprojects = workspaceProjects.get(workspaceId);
|
|
94
|
-
if (!wprojects)
|
|
95
|
-
continue; // Should not happen since workspaceId comes from keys()
|
|
96
|
-
const workspace = workspaceMap.get(workspaceId);
|
|
97
|
-
const workspaceName = workspace?.name ?? `Workspace ${workspaceId}`;
|
|
98
|
-
console.log(chalk.bold(workspaceName));
|
|
99
|
-
for (const project of wprojects) {
|
|
100
|
-
const id = chalk.dim(project.id);
|
|
101
|
-
const name = project.isFavorite
|
|
102
|
-
? chalk.yellow(`${project.name}${isAccessible() ? ' ★' : ''}`)
|
|
103
|
-
: project.name;
|
|
104
|
-
console.log(` ${id} ${name}`);
|
|
105
|
-
if (options.showUrls) {
|
|
106
|
-
console.log(` ${chalk.dim(projectUrl(project.id))}`);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
console.log('');
|
|
110
|
-
}
|
|
111
|
-
console.log(formatNextCursorFooter(nextCursor));
|
|
112
|
-
if (sortedWorkspaceIds.length > 0) {
|
|
113
|
-
console.log(chalk.dim('Tip: Use `td workspace projects <name>` for a detailed view with folders.'));
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
export async function viewProject(ref, options = {}) {
|
|
117
|
-
const api = await getApi();
|
|
118
|
-
const project = await resolveProjectRef(api, ref);
|
|
119
|
-
if (options.detailed) {
|
|
120
|
-
const fullData = await api.getFullProject(project.id);
|
|
121
|
-
if (options.json) {
|
|
122
|
-
const output = {
|
|
123
|
-
project: fullData.project
|
|
124
|
-
? JSON.parse(formatJson(fullData.project, 'project', options.full, options.showUrls))
|
|
125
|
-
: null,
|
|
126
|
-
commentsCount: fullData.commentsCount,
|
|
127
|
-
tasks: JSON.parse(formatJson(fullData.tasks, 'task', options.full, options.showUrls)),
|
|
128
|
-
sections: JSON.parse(formatJson(fullData.sections, 'section', options.full, options.showUrls)),
|
|
129
|
-
collaborators: fullData.collaborators,
|
|
130
|
-
notes: fullData.notes,
|
|
131
|
-
};
|
|
132
|
-
console.log(JSON.stringify(output, null, 2));
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
if (options.ndjson) {
|
|
136
|
-
const lines = [];
|
|
137
|
-
if (fullData.project) {
|
|
138
|
-
lines.push(formatNdjson([fullData.project], 'project', options.full, options.showUrls));
|
|
139
|
-
}
|
|
140
|
-
if (fullData.tasks.length > 0) {
|
|
141
|
-
lines.push(formatNdjson(fullData.tasks, 'task', options.full, options.showUrls));
|
|
142
|
-
}
|
|
143
|
-
if (fullData.sections.length > 0) {
|
|
144
|
-
lines.push(formatNdjson(fullData.sections, 'section', options.full, options.showUrls));
|
|
145
|
-
}
|
|
146
|
-
if (fullData.collaborators.length > 0) {
|
|
147
|
-
lines.push(formatNdjson(fullData.collaborators));
|
|
148
|
-
}
|
|
149
|
-
if (fullData.notes.length > 0) {
|
|
150
|
-
lines.push(formatNdjson(fullData.notes));
|
|
151
|
-
}
|
|
152
|
-
console.log(lines.join('\n'));
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
const displayProject = fullData.project ?? project;
|
|
156
|
-
console.log(chalk.bold(displayProject.name));
|
|
157
|
-
console.log('');
|
|
158
|
-
console.log(`ID: ${displayProject.id}`);
|
|
159
|
-
if (isWorkspaceProject(displayProject)) {
|
|
160
|
-
const workspaces = await fetchWorkspaces();
|
|
161
|
-
const folders = await fetchWorkspaceFolders();
|
|
162
|
-
const workspace = workspaces.find((w) => w.id === displayProject.workspaceId);
|
|
163
|
-
if (workspace) {
|
|
164
|
-
console.log(`Workspace: ${workspace.name}`);
|
|
165
|
-
}
|
|
166
|
-
if (displayProject.folderId) {
|
|
167
|
-
const folder = folders.find((f) => f.id === displayProject.folderId);
|
|
168
|
-
if (folder) {
|
|
169
|
-
console.log(`Folder: ${folder.name}`);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
else if (displayProject.isShared) {
|
|
174
|
-
console.log(`Shared: Yes`);
|
|
175
|
-
}
|
|
176
|
-
console.log(`Color: ${displayProject.color}`);
|
|
177
|
-
console.log(`Favorite: ${displayProject.isFavorite ? 'Yes' : 'No'}`);
|
|
178
|
-
console.log(`Comments: ${fullData.commentsCount}`);
|
|
179
|
-
console.log(`URL: ${projectUrl(displayProject.id)}`);
|
|
180
|
-
if (fullData.tasks.length > 0) {
|
|
181
|
-
console.log('');
|
|
182
|
-
console.log(chalk.dim(`--- Tasks (${fullData.tasks.length}) ---`));
|
|
183
|
-
for (const task of fullData.tasks) {
|
|
184
|
-
console.log(formatTaskRow({ task, showUrl: options.showUrls }));
|
|
185
|
-
console.log('');
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
if (fullData.sections.length > 0) {
|
|
189
|
-
console.log(chalk.dim(`--- Sections (${fullData.sections.length}) ---`));
|
|
190
|
-
for (const section of fullData.sections) {
|
|
191
|
-
console.log(`${chalk.dim(section.id)} ${section.name}`);
|
|
192
|
-
}
|
|
193
|
-
console.log('');
|
|
194
|
-
}
|
|
195
|
-
if (fullData.collaborators.length > 0) {
|
|
196
|
-
console.log(chalk.dim(`--- Collaborators (${fullData.collaborators.length}) ---`));
|
|
197
|
-
for (const user of fullData.collaborators) {
|
|
198
|
-
console.log(`${chalk.dim(user.id)} ${formatUserShortName(user.name)}`);
|
|
199
|
-
}
|
|
200
|
-
console.log('');
|
|
201
|
-
}
|
|
202
|
-
if (fullData.notes.length > 0) {
|
|
203
|
-
console.log(chalk.dim(`--- Notes (${fullData.notes.length}) ---`));
|
|
204
|
-
for (const note of fullData.notes) {
|
|
205
|
-
console.log(`${chalk.dim(note.id)} ${note.content}`);
|
|
206
|
-
}
|
|
207
|
-
console.log('');
|
|
208
|
-
}
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
if (options.json) {
|
|
212
|
-
console.log(formatJson(project, 'project', options.full, options.showUrls));
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
const { results: tasks } = await api.getTasks({ projectId: project.id });
|
|
216
|
-
if (options.ndjson) {
|
|
217
|
-
const lines = [];
|
|
218
|
-
lines.push(formatNdjson([project], 'project', options.full, options.showUrls));
|
|
219
|
-
if (tasks.length > 0) {
|
|
220
|
-
lines.push(formatNdjson(tasks, 'task', options.full, options.showUrls));
|
|
221
|
-
}
|
|
222
|
-
console.log(lines.join('\n'));
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
console.log(chalk.bold(project.name));
|
|
226
|
-
console.log('');
|
|
227
|
-
console.log(`ID: ${project.id}`);
|
|
228
|
-
if (isWorkspaceProject(project)) {
|
|
229
|
-
const [workspaces, folders] = await Promise.all([
|
|
230
|
-
fetchWorkspaces(),
|
|
231
|
-
fetchWorkspaceFolders(),
|
|
232
|
-
]);
|
|
233
|
-
const workspace = workspaces.find((w) => w.id === project.workspaceId);
|
|
234
|
-
if (workspace) {
|
|
235
|
-
console.log(`Workspace: ${workspace.name}`);
|
|
236
|
-
}
|
|
237
|
-
if (project.folderId) {
|
|
238
|
-
const folder = folders.find((f) => f.id === project.folderId);
|
|
239
|
-
if (folder) {
|
|
240
|
-
console.log(`Folder: ${folder.name}`);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
else if (project.isShared) {
|
|
245
|
-
console.log(`Shared: Yes`);
|
|
246
|
-
}
|
|
247
|
-
console.log(`Color: ${project.color}`);
|
|
248
|
-
console.log(`Favorite: ${project.isFavorite ? 'Yes' : 'No'}`);
|
|
249
|
-
console.log(`URL: ${projectUrl(project.id)}`);
|
|
250
|
-
if (tasks.length > 0) {
|
|
251
|
-
console.log('');
|
|
252
|
-
console.log(chalk.dim(`--- Tasks (${tasks.length}) ---`));
|
|
253
|
-
for (const task of tasks) {
|
|
254
|
-
console.log(formatTaskRow({ task, showUrl: options.showUrls }));
|
|
255
|
-
console.log('');
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
async function deleteProject(ref, options) {
|
|
260
|
-
const api = await getApi();
|
|
261
|
-
const project = await resolveProjectRef(api, ref);
|
|
262
|
-
const { results: tasks } = await api.getTasks({ projectId: project.id });
|
|
263
|
-
if (tasks.length > 0) {
|
|
264
|
-
throw new Error(formatError('HAS_TASKS', `Cannot delete project: ${tasks.length} uncompleted task${tasks.length === 1 ? '' : 's'} remain.`));
|
|
265
|
-
}
|
|
266
|
-
if (options.dryRun) {
|
|
267
|
-
printDryRun('delete project', { Project: project.name });
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
if (!options.yes) {
|
|
271
|
-
console.log(`Would delete project: ${project.name}`);
|
|
272
|
-
console.log('Use --yes to confirm.');
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
await api.deleteProject(project.id);
|
|
276
|
-
console.log(`Deleted project: ${project.name}`);
|
|
277
|
-
}
|
|
278
|
-
async function listCollaborators(ref) {
|
|
279
|
-
const api = await getApi();
|
|
280
|
-
const project = await resolveProjectRef(api, ref);
|
|
281
|
-
if (isWorkspaceProject(project)) {
|
|
282
|
-
const workspaceIdNum = parseInt(project.workspaceId, 10);
|
|
283
|
-
let cursor;
|
|
284
|
-
while (true) {
|
|
285
|
-
const response = await api.getWorkspaceUsers({
|
|
286
|
-
workspaceId: workspaceIdNum,
|
|
287
|
-
cursor,
|
|
288
|
-
limit: 200,
|
|
289
|
-
});
|
|
290
|
-
for (const user of response.workspaceUsers) {
|
|
291
|
-
const id = chalk.dim(user.userId);
|
|
292
|
-
const name = formatUserShortName(user.fullName);
|
|
293
|
-
const email = chalk.dim(`<${user.userEmail}>`);
|
|
294
|
-
const role = chalk.dim(`[${user.role}]`);
|
|
295
|
-
console.log(`${id} ${name} ${email} ${role}`);
|
|
296
|
-
}
|
|
297
|
-
if (!response.hasMore || !response.nextCursor)
|
|
298
|
-
break;
|
|
299
|
-
cursor = response.nextCursor;
|
|
300
|
-
}
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
if (!project.isShared) {
|
|
304
|
-
throw new Error(formatError('NOT_SHARED', 'Project is not shared.'));
|
|
305
|
-
}
|
|
306
|
-
let cursor;
|
|
307
|
-
while (true) {
|
|
308
|
-
const response = await api.getProjectCollaborators(project.id, { cursor });
|
|
309
|
-
for (const user of response.results) {
|
|
310
|
-
const id = chalk.dim(user.id);
|
|
311
|
-
const name = formatUserShortName(user.name);
|
|
312
|
-
const email = chalk.dim(`<${user.email}>`);
|
|
313
|
-
console.log(`${id} ${name} ${email}`);
|
|
314
|
-
}
|
|
315
|
-
if (!response.nextCursor)
|
|
316
|
-
break;
|
|
317
|
-
cursor = response.nextCursor;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
async function createProject(options) {
|
|
321
|
-
if (options.dryRun) {
|
|
322
|
-
printDryRun('create project', {
|
|
323
|
-
Name: options.name,
|
|
324
|
-
Color: options.color,
|
|
325
|
-
Favorite: options.favorite ? 'yes' : undefined,
|
|
326
|
-
Parent: options.parent,
|
|
327
|
-
'View style': options.viewStyle,
|
|
328
|
-
});
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
const api = await getApi();
|
|
332
|
-
let parentId;
|
|
333
|
-
if (options.parent) {
|
|
334
|
-
const parentProject = await resolveProjectRef(api, options.parent);
|
|
335
|
-
if (isWorkspaceProject(parentProject)) {
|
|
336
|
-
throw new Error(formatError('WORKSPACE_NO_SUBPROJECTS', 'Workspace projects do not support sub-projects.', ['Sub-projects are only supported for personal projects.']));
|
|
337
|
-
}
|
|
338
|
-
parentId = parentProject.id;
|
|
339
|
-
}
|
|
340
|
-
const project = await api.addProject({
|
|
341
|
-
name: options.name,
|
|
342
|
-
color: options.color,
|
|
343
|
-
isFavorite: options.favorite,
|
|
344
|
-
parentId,
|
|
345
|
-
viewStyle: options.viewStyle,
|
|
346
|
-
});
|
|
347
|
-
if (options.json) {
|
|
348
|
-
console.log(formatJson(project, 'project'));
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
console.log(`Created: ${project.name}`);
|
|
352
|
-
console.log(chalk.dim(`ID: ${project.id}`));
|
|
353
|
-
}
|
|
354
|
-
async function updateProject(ref, options) {
|
|
355
|
-
const api = await getApi();
|
|
356
|
-
const project = await resolveProjectRef(api, ref);
|
|
357
|
-
const args = {};
|
|
358
|
-
if (options.name)
|
|
359
|
-
args.name = options.name;
|
|
360
|
-
if (options.color)
|
|
361
|
-
args.color = options.color;
|
|
362
|
-
if (options.favorite === true)
|
|
363
|
-
args.isFavorite = true;
|
|
364
|
-
if (options.favorite === false)
|
|
365
|
-
args.isFavorite = false;
|
|
366
|
-
if (options.viewStyle)
|
|
367
|
-
args.viewStyle = options.viewStyle;
|
|
368
|
-
if (Object.keys(args).length === 0) {
|
|
369
|
-
throw new Error(formatError('NO_CHANGES', 'No changes specified.'));
|
|
370
|
-
}
|
|
371
|
-
if (options.dryRun) {
|
|
372
|
-
printDryRun('update project', {
|
|
373
|
-
Project: project.name,
|
|
374
|
-
Name: args.name,
|
|
375
|
-
Color: args.color,
|
|
376
|
-
Favorite: args.isFavorite !== undefined ? String(args.isFavorite) : undefined,
|
|
377
|
-
'View style': args.viewStyle,
|
|
378
|
-
});
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
const updated = await api.updateProject(project.id, args);
|
|
382
|
-
if (options.json) {
|
|
383
|
-
console.log(formatJson(updated, 'project'));
|
|
384
|
-
return;
|
|
385
|
-
}
|
|
386
|
-
console.log(`Updated: ${updated.name}`);
|
|
387
|
-
}
|
|
388
|
-
async function archiveProject(ref, options) {
|
|
389
|
-
const api = await getApi();
|
|
390
|
-
const project = await resolveProjectRef(api, ref);
|
|
391
|
-
if (options.dryRun) {
|
|
392
|
-
printDryRun('archive project', { Project: project.name });
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
await api.archiveProject(project.id);
|
|
396
|
-
console.log(`Archived: ${project.name}`);
|
|
397
|
-
}
|
|
398
|
-
async function unarchiveProject(ref, options) {
|
|
399
|
-
const api = await getApi();
|
|
400
|
-
const project = await resolveProjectRef(api, ref);
|
|
401
|
-
if (options.dryRun) {
|
|
402
|
-
printDryRun('unarchive project', { Project: project.name });
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
await api.unarchiveProject(project.id);
|
|
406
|
-
console.log(`Unarchived: ${project.name}`);
|
|
407
|
-
}
|
|
408
|
-
async function browseProject(ref) {
|
|
409
|
-
const api = await getApi();
|
|
410
|
-
const project = await resolveProjectRef(api, ref);
|
|
411
|
-
await openInBrowser(projectUrl(project.id));
|
|
412
|
-
}
|
|
413
|
-
const validVisibilities = ProjectVisibilitySchema.options;
|
|
414
|
-
async function moveProject(ref, options) {
|
|
415
|
-
if (options.toWorkspace && options.toPersonal) {
|
|
416
|
-
throw new Error(formatError('INVALID_OPTIONS', 'Cannot specify both --to-workspace and --to-personal.'));
|
|
417
|
-
}
|
|
418
|
-
if (!options.toWorkspace && !options.toPersonal) {
|
|
419
|
-
throw new Error(formatError('MISSING_DESTINATION', 'Specify --to-workspace <ref> or --to-personal.'));
|
|
420
|
-
}
|
|
421
|
-
if (options.folder && !options.toWorkspace) {
|
|
422
|
-
throw new Error(formatError('INVALID_OPTIONS', '--folder is only valid with --to-workspace.'));
|
|
423
|
-
}
|
|
424
|
-
if (options.visibility && !options.toWorkspace) {
|
|
425
|
-
throw new Error(formatError('INVALID_OPTIONS', '--visibility is only valid with --to-workspace.'));
|
|
426
|
-
}
|
|
427
|
-
if (options.visibility &&
|
|
428
|
-
!validVisibilities.includes(options.visibility)) {
|
|
429
|
-
throw new Error(formatError('INVALID_VISIBILITY', `Invalid visibility "${options.visibility}".`, [
|
|
430
|
-
`Valid values: ${validVisibilities.join(', ')}`,
|
|
431
|
-
]));
|
|
432
|
-
}
|
|
433
|
-
const api = await getApi();
|
|
434
|
-
const project = await resolveProjectRef(api, ref);
|
|
435
|
-
if (options.toWorkspace) {
|
|
436
|
-
const workspace = await resolveWorkspaceRef(options.toWorkspace);
|
|
437
|
-
if (isWorkspaceProject(project) && project.workspaceId === workspace.id) {
|
|
438
|
-
throw new Error(formatError('SAME_WORKSPACE', `Project "${project.name}" is already in workspace "${workspace.name}".`));
|
|
439
|
-
}
|
|
440
|
-
const args = {
|
|
441
|
-
projectId: project.id,
|
|
442
|
-
workspaceId: workspace.id,
|
|
443
|
-
};
|
|
444
|
-
let folderName;
|
|
445
|
-
if (options.folder) {
|
|
446
|
-
const folder = await resolveFolderRef(options.folder, workspace.id);
|
|
447
|
-
args.folderId = folder.id;
|
|
448
|
-
folderName = folder.name;
|
|
449
|
-
}
|
|
450
|
-
if (options.visibility) {
|
|
451
|
-
args.access = { visibility: options.visibility };
|
|
452
|
-
}
|
|
453
|
-
if (options.dryRun || !options.yes) {
|
|
454
|
-
let preview = `Would move "${project.name}" to workspace "${workspace.name}"`;
|
|
455
|
-
if (folderName) {
|
|
456
|
-
preview += ` (folder: ${folderName})`;
|
|
457
|
-
}
|
|
458
|
-
if (options.visibility) {
|
|
459
|
-
preview += ` (visibility: ${options.visibility})`;
|
|
460
|
-
}
|
|
461
|
-
console.log(preview);
|
|
462
|
-
if (!options.dryRun)
|
|
463
|
-
console.log('Use --yes to confirm.');
|
|
464
|
-
return;
|
|
465
|
-
}
|
|
466
|
-
await api.moveProjectToWorkspace(args);
|
|
467
|
-
let output = `Moved "${project.name}" to workspace "${workspace.name}"`;
|
|
468
|
-
if (folderName) {
|
|
469
|
-
output += ` (folder: ${folderName})`;
|
|
470
|
-
}
|
|
471
|
-
console.log(output);
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
if (isPersonalProject(project)) {
|
|
475
|
-
throw new Error(formatError('ALREADY_PERSONAL', `Project "${project.name}" is already a personal project.`));
|
|
476
|
-
}
|
|
477
|
-
if (options.dryRun || !options.yes) {
|
|
478
|
-
console.log(`Would move "${project.name}" to personal`);
|
|
479
|
-
if (!options.dryRun)
|
|
480
|
-
console.log('Use --yes to confirm.');
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
await api.moveProjectToPersonal({ projectId: project.id });
|
|
484
|
-
console.log(`Moved "${project.name}" to personal`);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
async function archivedCount(options) {
|
|
488
|
-
const api = await getApi();
|
|
489
|
-
const args = {};
|
|
490
|
-
let workspaceName;
|
|
491
|
-
if (options.workspace) {
|
|
492
|
-
const workspace = await resolveWorkspaceRef(options.workspace);
|
|
493
|
-
args.workspaceId = parseInt(workspace.id, 10);
|
|
494
|
-
workspaceName = workspace.name;
|
|
495
|
-
}
|
|
496
|
-
if (options.joined) {
|
|
497
|
-
args.joined = true;
|
|
498
|
-
}
|
|
499
|
-
const result = await api.getArchivedProjectsCount(args);
|
|
500
|
-
if (options.json) {
|
|
501
|
-
console.log(JSON.stringify(result, null, 2));
|
|
502
|
-
return;
|
|
503
|
-
}
|
|
504
|
-
let output = `Archived projects: ${result.count}`;
|
|
505
|
-
if (workspaceName) {
|
|
506
|
-
output += ` (workspace: ${workspaceName})`;
|
|
507
|
-
}
|
|
508
|
-
console.log(output);
|
|
509
|
-
}
|
|
510
|
-
async function showPermissions(options) {
|
|
511
|
-
const api = await getApi();
|
|
512
|
-
const result = await api.getProjectPermissions();
|
|
513
|
-
if (options.json) {
|
|
514
|
-
console.log(JSON.stringify(result, null, 2));
|
|
515
|
-
return;
|
|
516
|
-
}
|
|
517
|
-
if (result.projectCollaboratorActions.length > 0) {
|
|
518
|
-
console.log(chalk.bold('Project Collaborator Roles'));
|
|
519
|
-
console.log('');
|
|
520
|
-
for (const role of result.projectCollaboratorActions) {
|
|
521
|
-
console.log(` ${chalk.bold(role.name)}`);
|
|
522
|
-
for (const action of role.actions) {
|
|
523
|
-
console.log(` ${action.name}`);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
if (result.workspaceCollaboratorActions.length > 0) {
|
|
528
|
-
if (result.projectCollaboratorActions.length > 0) {
|
|
529
|
-
console.log('');
|
|
530
|
-
}
|
|
531
|
-
console.log(chalk.bold('Workspace Collaborator Roles'));
|
|
532
|
-
console.log('');
|
|
533
|
-
for (const role of result.workspaceCollaboratorActions) {
|
|
534
|
-
console.log(` ${chalk.bold(role.name)}`);
|
|
535
|
-
for (const action of role.actions) {
|
|
536
|
-
console.log(` ${action.name}`);
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
async function joinProjectCmd(ref, options) {
|
|
542
|
-
const id = lenientIdRef(ref, 'project');
|
|
543
|
-
if (options.dryRun) {
|
|
544
|
-
printDryRun('join project', { ID: id });
|
|
545
|
-
return;
|
|
546
|
-
}
|
|
547
|
-
const api = await getApi();
|
|
548
|
-
const project = await api.joinProject(id);
|
|
549
|
-
if (options.json) {
|
|
550
|
-
console.log(formatJson(project, 'project'));
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
console.log(`Joined: ${project.name}`);
|
|
554
|
-
console.log(chalk.dim(`ID: ${project.id}`));
|
|
555
|
-
}
|
|
556
|
-
async function showProjectProgress(ref, options) {
|
|
557
|
-
const api = await getApi();
|
|
558
|
-
const project = await resolveProjectRef(api, ref);
|
|
559
|
-
const progress = await api.getProjectProgress(project.id);
|
|
560
|
-
if (options.json) {
|
|
561
|
-
console.log(JSON.stringify(progress, null, 2));
|
|
562
|
-
return;
|
|
563
|
-
}
|
|
564
|
-
const total = progress.completedCount + progress.activeCount;
|
|
565
|
-
console.log(chalk.bold(project.name));
|
|
566
|
-
console.log('');
|
|
567
|
-
console.log(`Progress: ${formatProgressBar(progress.progressPercent)} (${progress.completedCount}/${total})`);
|
|
568
|
-
console.log(` Completed: ${progress.completedCount}`);
|
|
569
|
-
console.log(` Active: ${progress.activeCount}`);
|
|
570
|
-
}
|
|
571
|
-
async function showProjectHealth(ref, options) {
|
|
572
|
-
const api = await getApi();
|
|
573
|
-
const project = await resolveProjectRef(api, ref);
|
|
574
|
-
const health = await api.getProjectHealth(project.id);
|
|
575
|
-
if (options.json) {
|
|
576
|
-
console.log(JSON.stringify(health, null, 2));
|
|
577
|
-
return;
|
|
578
|
-
}
|
|
579
|
-
console.log(chalk.bold(project.name));
|
|
580
|
-
console.log('');
|
|
581
|
-
let statusLine = `Health: ${formatHealthStatus(health.status)}`;
|
|
582
|
-
if (health.isStale) {
|
|
583
|
-
statusLine += chalk.dim(` (stale - run 'td project analyze-health "${project.name}"' to refresh)`);
|
|
584
|
-
}
|
|
585
|
-
if (health.updateInProgress) {
|
|
586
|
-
statusLine += chalk.dim(' (analysis in progress...)');
|
|
587
|
-
}
|
|
588
|
-
console.log(statusLine);
|
|
589
|
-
if (health.updatedAt) {
|
|
590
|
-
console.log(` Updated: ${health.updatedAt}`);
|
|
591
|
-
}
|
|
592
|
-
if (health.description) {
|
|
593
|
-
console.log('');
|
|
594
|
-
console.log(' Summary:');
|
|
595
|
-
console.log(` ${health.description}`);
|
|
596
|
-
}
|
|
597
|
-
if (health.taskRecommendations && health.taskRecommendations.length > 0) {
|
|
598
|
-
console.log('');
|
|
599
|
-
console.log(' Recommendations:');
|
|
600
|
-
for (const rec of health.taskRecommendations) {
|
|
601
|
-
console.log(` - ${chalk.dim(`id:${rec.taskId}`)}: ${rec.recommendation}`);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
async function showProjectHealthContext(ref, options) {
|
|
606
|
-
const api = await getApi();
|
|
607
|
-
const project = await resolveProjectRef(api, ref);
|
|
608
|
-
const context = await api.getProjectHealthContext(project.id);
|
|
609
|
-
if (options.json) {
|
|
610
|
-
console.log(JSON.stringify(context, null, 2));
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
console.log(chalk.bold(context.projectName));
|
|
614
|
-
console.log('');
|
|
615
|
-
console.log('Metrics:');
|
|
616
|
-
const projectMetrics = context.projectMetrics;
|
|
617
|
-
console.log(` Total tasks: ${projectMetrics.totalTasks}`);
|
|
618
|
-
console.log(` Completed: ${projectMetrics.completedTasks}`);
|
|
619
|
-
console.log(` Overdue: ${projectMetrics.overdueTasks}`);
|
|
620
|
-
console.log(` Created this week: ${projectMetrics.tasksCreatedThisWeek}`);
|
|
621
|
-
console.log(` Completed this week: ${projectMetrics.tasksCompletedThisWeek}`);
|
|
622
|
-
if (projectMetrics.averageCompletionTime !== null) {
|
|
623
|
-
console.log(` Avg completion time: ${projectMetrics.averageCompletionTime.toFixed(1)} days`);
|
|
624
|
-
}
|
|
625
|
-
if (context.tasks.length > 0) {
|
|
626
|
-
console.log('');
|
|
627
|
-
console.log(chalk.dim(`--- Tasks (${context.tasks.length}) ---`));
|
|
628
|
-
for (const task of context.tasks) {
|
|
629
|
-
const parts = [chalk.dim(`id:${task.id}`)];
|
|
630
|
-
parts.push(`p${5 - parseInt(task.priority, 10)}`);
|
|
631
|
-
if (task.due)
|
|
632
|
-
parts.push(chalk.green(`due:${task.due}`));
|
|
633
|
-
if (task.deadline)
|
|
634
|
-
parts.push(chalk.red(`deadline:${task.deadline}`));
|
|
635
|
-
if (task.isCompleted)
|
|
636
|
-
parts.push(chalk.dim('[done]'));
|
|
637
|
-
if (task.labels.length > 0)
|
|
638
|
-
parts.push(chalk.cyan(task.labels.join(', ')));
|
|
639
|
-
console.log(` ${task.content}`);
|
|
640
|
-
console.log(` ${parts.join(' ')}`);
|
|
641
|
-
console.log('');
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
async function showProjectActivityStats(ref, options) {
|
|
646
|
-
const api = await getApi();
|
|
647
|
-
const project = await resolveProjectRef(api, ref);
|
|
648
|
-
const args = {};
|
|
649
|
-
if (options.weeks) {
|
|
650
|
-
const weeks = parseInt(options.weeks, 10);
|
|
651
|
-
if (isNaN(weeks) || weeks < 1 || weeks > 12) {
|
|
652
|
-
throw new Error(formatError('INVALID_WEEKS', 'The --weeks value must be a number between 1 and 12.'));
|
|
653
|
-
}
|
|
654
|
-
args.weeks = weeks;
|
|
655
|
-
}
|
|
656
|
-
if (options.includeWeekly)
|
|
657
|
-
args.includeWeeklyCounts = true;
|
|
658
|
-
const stats = await api.getProjectActivityStats(project.id, args);
|
|
659
|
-
if (options.json) {
|
|
660
|
-
console.log(JSON.stringify(stats, null, 2));
|
|
661
|
-
return;
|
|
662
|
-
}
|
|
663
|
-
console.log(chalk.bold(`${project.name} - Activity Stats`));
|
|
664
|
-
if (stats.dayItems.length > 0) {
|
|
665
|
-
console.log('');
|
|
666
|
-
console.log('Daily:');
|
|
667
|
-
for (const day of stats.dayItems) {
|
|
668
|
-
const count = String(day.totalCount).padStart(4);
|
|
669
|
-
console.log(` ${day.date} ${count} items`);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
if (stats.weekItems && stats.weekItems.length > 0) {
|
|
673
|
-
console.log('');
|
|
674
|
-
console.log('Weekly:');
|
|
675
|
-
for (const week of stats.weekItems) {
|
|
676
|
-
const count = String(week.totalCount).padStart(4);
|
|
677
|
-
console.log(` ${week.fromDate} to ${week.toDate} ${count} items`);
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
async function analyzeHealth(ref, options) {
|
|
682
|
-
const api = await getApi();
|
|
683
|
-
const project = await resolveProjectRef(api, ref);
|
|
684
|
-
if (options.dryRun) {
|
|
685
|
-
printDryRun('trigger health analysis', { Project: project.name });
|
|
686
|
-
return;
|
|
687
|
-
}
|
|
688
|
-
const health = await api.analyzeProjectHealth(project.id);
|
|
689
|
-
if (options.json) {
|
|
690
|
-
console.log(JSON.stringify(health, null, 2));
|
|
691
|
-
return;
|
|
692
|
-
}
|
|
693
|
-
console.log(`Triggered health analysis for "${project.name}"`);
|
|
694
|
-
console.log(chalk.dim(`Analysis is in progress. Run 'td project health "${project.name}"' to check results.`));
|
|
695
|
-
}
|
|
696
|
-
export function registerProjectCommand(program) {
|
|
697
|
-
const project = program.command('project').description('Manage projects');
|
|
698
|
-
project
|
|
699
|
-
.command('list')
|
|
700
|
-
.description('List all projects')
|
|
701
|
-
.option('--limit <n>', 'Limit number of results (default: 50)')
|
|
702
|
-
.option('--cursor <cursor>', 'Continue from cursor')
|
|
703
|
-
.option('--all', 'Fetch all results (no limit)')
|
|
704
|
-
.option('--personal', 'Show only personal projects')
|
|
705
|
-
.option('--json', 'Output as JSON')
|
|
706
|
-
.option('--ndjson', 'Output as newline-delimited JSON')
|
|
707
|
-
.option('--full', 'Include all fields in JSON output')
|
|
708
|
-
.option('--show-urls', 'Show web app URLs for each project')
|
|
709
|
-
.action(listProjects);
|
|
710
|
-
project
|
|
711
|
-
.command('view [ref]', { isDefault: true })
|
|
712
|
-
.description('View project details')
|
|
713
|
-
.option('--json', 'Output as JSON')
|
|
714
|
-
.option('--ndjson', 'Output as newline-delimited JSON')
|
|
715
|
-
.option('--full', 'Include all fields in JSON output')
|
|
716
|
-
.option('--detailed', 'Include sections, collaborators, notes, and comment count')
|
|
717
|
-
.option('--show-urls', 'Show web app URLs for each task')
|
|
718
|
-
.action((ref, options) => {
|
|
719
|
-
if (!ref) {
|
|
720
|
-
project.help();
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
return viewProject(ref, options);
|
|
724
|
-
});
|
|
725
|
-
const collaboratorsCmd = project
|
|
726
|
-
.command('collaborators [ref]')
|
|
727
|
-
.description('List project collaborators')
|
|
728
|
-
.action((ref) => {
|
|
729
|
-
if (!ref) {
|
|
730
|
-
collaboratorsCmd.help();
|
|
731
|
-
return;
|
|
732
|
-
}
|
|
733
|
-
return listCollaborators(ref);
|
|
734
|
-
});
|
|
735
|
-
const deleteCmd = project
|
|
736
|
-
.command('delete [ref]')
|
|
737
|
-
.description('Delete a project (must have no uncompleted tasks)')
|
|
738
|
-
.option('--yes', 'Confirm deletion')
|
|
739
|
-
.option('--dry-run', 'Preview what would happen without executing')
|
|
740
|
-
.action((ref, options) => {
|
|
741
|
-
if (!ref) {
|
|
742
|
-
deleteCmd.help();
|
|
743
|
-
return;
|
|
744
|
-
}
|
|
745
|
-
return deleteProject(ref, options);
|
|
746
|
-
});
|
|
747
|
-
const createCmd = project
|
|
748
|
-
.command('create')
|
|
749
|
-
.description('Create a project')
|
|
750
|
-
.option('--name <name>', 'Project name (required)')
|
|
751
|
-
.option('--color <color>', 'Project color')
|
|
752
|
-
.option('--favorite', 'Mark as favorite')
|
|
753
|
-
.option('--parent <ref>', 'Parent project (name or id:xxx)')
|
|
754
|
-
.addOption(withCaseInsensitiveChoices(new Option('--view-style <style>', 'View style (list, board, or calendar)'), VIEW_STYLE_CHOICES))
|
|
755
|
-
.option('--json', 'Output the created project as JSON')
|
|
756
|
-
.option('--dry-run', 'Preview what would happen without executing')
|
|
757
|
-
.action((options) => {
|
|
758
|
-
if (!options.name) {
|
|
759
|
-
createCmd.help();
|
|
760
|
-
return;
|
|
761
|
-
}
|
|
762
|
-
return createProject(options);
|
|
763
|
-
});
|
|
764
|
-
const updateCmd = project
|
|
765
|
-
.command('update [ref]')
|
|
766
|
-
.description('Update a project')
|
|
767
|
-
.option('--name <name>', 'New name')
|
|
768
|
-
.option('--color <color>', 'New color')
|
|
769
|
-
.option('--favorite', 'Mark as favorite')
|
|
770
|
-
.option('--no-favorite', 'Remove from favorites')
|
|
771
|
-
.addOption(withCaseInsensitiveChoices(new Option('--view-style <style>', 'View style (list, board, or calendar)'), VIEW_STYLE_CHOICES))
|
|
772
|
-
.option('--json', 'Output the updated project as JSON')
|
|
773
|
-
.option('--dry-run', 'Preview what would happen without executing')
|
|
774
|
-
.action((ref, options) => {
|
|
775
|
-
if (!ref) {
|
|
776
|
-
updateCmd.help();
|
|
777
|
-
return;
|
|
778
|
-
}
|
|
779
|
-
return updateProject(ref, options);
|
|
780
|
-
});
|
|
781
|
-
const archiveCmd = project
|
|
782
|
-
.command('archive [ref]')
|
|
783
|
-
.description('Archive a project')
|
|
784
|
-
.option('--dry-run', 'Preview what would happen without executing')
|
|
785
|
-
.action((ref, options) => {
|
|
786
|
-
if (!ref) {
|
|
787
|
-
archiveCmd.help();
|
|
788
|
-
return;
|
|
789
|
-
}
|
|
790
|
-
return archiveProject(ref, options);
|
|
791
|
-
});
|
|
792
|
-
const unarchiveCmd = project
|
|
793
|
-
.command('unarchive [ref]')
|
|
794
|
-
.description('Unarchive a project')
|
|
795
|
-
.option('--dry-run', 'Preview what would happen without executing')
|
|
796
|
-
.action((ref, options) => {
|
|
797
|
-
if (!ref) {
|
|
798
|
-
unarchiveCmd.help();
|
|
799
|
-
return;
|
|
800
|
-
}
|
|
801
|
-
return unarchiveProject(ref, options);
|
|
802
|
-
});
|
|
803
|
-
const browseCmd = project
|
|
804
|
-
.command('browse [ref]')
|
|
805
|
-
.description('Open project in browser')
|
|
806
|
-
.action((ref) => {
|
|
807
|
-
if (!ref) {
|
|
808
|
-
browseCmd.help();
|
|
809
|
-
return;
|
|
810
|
-
}
|
|
811
|
-
return browseProject(ref);
|
|
812
|
-
});
|
|
813
|
-
const moveCmd = project
|
|
814
|
-
.command('move [ref]')
|
|
815
|
-
.description('Move project between personal and workspace')
|
|
816
|
-
.option('--to-workspace <ref>', 'Target workspace (name or id:xxx)')
|
|
817
|
-
.option('--to-personal', 'Move to personal')
|
|
818
|
-
.option('--folder <ref>', 'Target folder in workspace (name or id:xxx)')
|
|
819
|
-
.option('--visibility <level>', 'Access visibility (restricted, team, public)')
|
|
820
|
-
.option('--yes', 'Confirm move')
|
|
821
|
-
.option('--dry-run', 'Preview what would happen without executing')
|
|
822
|
-
.action((ref, options) => {
|
|
823
|
-
if (!ref) {
|
|
824
|
-
moveCmd.help();
|
|
825
|
-
return;
|
|
826
|
-
}
|
|
827
|
-
return moveProject(ref, options);
|
|
828
|
-
});
|
|
829
|
-
project
|
|
830
|
-
.command('archived-count')
|
|
831
|
-
.description('Count archived projects')
|
|
832
|
-
.option('--workspace <ref>', 'Filter to a workspace (name or id:xxx)')
|
|
833
|
-
.option('--joined', 'Count only joined projects')
|
|
834
|
-
.option('--json', 'Output as JSON')
|
|
835
|
-
.action(archivedCount);
|
|
836
|
-
project
|
|
837
|
-
.command('permissions')
|
|
838
|
-
.description('Show project permission mappings by role')
|
|
839
|
-
.option('--json', 'Output as JSON')
|
|
840
|
-
.action(showPermissions);
|
|
841
|
-
const joinCmd = project
|
|
842
|
-
.command('join [ref]')
|
|
843
|
-
.description('Join a shared project')
|
|
844
|
-
.option('--json', 'Output the joined project as JSON')
|
|
845
|
-
.option('--dry-run', 'Preview what would happen without executing')
|
|
846
|
-
.action((ref, options) => {
|
|
847
|
-
if (!ref) {
|
|
848
|
-
joinCmd.help();
|
|
849
|
-
return;
|
|
850
|
-
}
|
|
851
|
-
return joinProjectCmd(ref, options);
|
|
852
|
-
});
|
|
853
|
-
const progressCmd = project
|
|
854
|
-
.command('progress [ref]')
|
|
855
|
-
.description('Show project completion progress')
|
|
856
|
-
.option('--json', 'Output as JSON')
|
|
857
|
-
.action((ref, options) => {
|
|
858
|
-
if (!ref) {
|
|
859
|
-
progressCmd.help();
|
|
860
|
-
return;
|
|
861
|
-
}
|
|
862
|
-
return showProjectProgress(ref, options);
|
|
863
|
-
});
|
|
864
|
-
const healthCmd = project
|
|
865
|
-
.command('health [ref]')
|
|
866
|
-
.description('Show project health status and recommendations')
|
|
867
|
-
.option('--json', 'Output as JSON')
|
|
868
|
-
.action((ref, options) => {
|
|
869
|
-
if (!ref) {
|
|
870
|
-
healthCmd.help();
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
return showProjectHealth(ref, options);
|
|
874
|
-
});
|
|
875
|
-
const healthContextCmd = project
|
|
876
|
-
.command('health-context [ref]')
|
|
877
|
-
.description('Show detailed project metrics and task breakdown for health analysis')
|
|
878
|
-
.option('--json', 'Output as JSON')
|
|
879
|
-
.action((ref, options) => {
|
|
880
|
-
if (!ref) {
|
|
881
|
-
healthContextCmd.help();
|
|
882
|
-
return;
|
|
883
|
-
}
|
|
884
|
-
return showProjectHealthContext(ref, options);
|
|
885
|
-
});
|
|
886
|
-
const activityStatsCmd = project
|
|
887
|
-
.command('activity-stats [ref]')
|
|
888
|
-
.description('Show project activity statistics')
|
|
889
|
-
.option('--json', 'Output as JSON')
|
|
890
|
-
.option('--weeks <n>', 'Number of weeks of data (1-12)')
|
|
891
|
-
.option('--include-weekly', 'Include weekly rollup counts')
|
|
892
|
-
.action((ref, options) => {
|
|
893
|
-
if (!ref) {
|
|
894
|
-
activityStatsCmd.help();
|
|
895
|
-
return;
|
|
896
|
-
}
|
|
897
|
-
return showProjectActivityStats(ref, options);
|
|
898
|
-
});
|
|
899
|
-
const analyzeHealthCmd = project
|
|
900
|
-
.command('analyze-health [ref]')
|
|
901
|
-
.description('Trigger a new health analysis for a project')
|
|
902
|
-
.option('--json', 'Output as JSON')
|
|
903
|
-
.option('--dry-run', 'Preview what would happen without executing')
|
|
904
|
-
.action((ref, options) => {
|
|
905
|
-
if (!ref) {
|
|
906
|
-
analyzeHealthCmd.help();
|
|
907
|
-
return;
|
|
908
|
-
}
|
|
909
|
-
return analyzeHealth(ref, options);
|
|
910
|
-
});
|
|
911
|
-
}
|
|
912
|
-
//# sourceMappingURL=project.js.map
|