@todoist/cli 0.0.1 → 6.0.0
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 +1387 -0
- package/LICENSE +9 -0
- package/README.md +192 -29
- package/dist/commands/activity.d.ts +3 -0
- package/dist/commands/activity.d.ts.map +1 -0
- package/dist/commands/activity.js +203 -0
- package/dist/commands/activity.js.map +1 -0
- package/dist/commands/add.d.ts +3 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +18 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/apps/delete.d.ts +6 -0
- package/dist/commands/apps/delete.d.ts.map +1 -0
- package/dist/commands/apps/delete.js +25 -0
- package/dist/commands/apps/delete.js.map +1 -0
- package/dist/commands/apps/helpers.d.ts +15 -0
- package/dist/commands/apps/helpers.d.ts.map +1 -0
- package/dist/commands/apps/helpers.js +122 -0
- package/dist/commands/apps/helpers.js.map +1 -0
- package/dist/commands/apps/index.d.ts +3 -0
- package/dist/commands/apps/index.d.ts.map +1 -0
- package/dist/commands/apps/index.js +89 -0
- package/dist/commands/apps/index.js.map +1 -0
- package/dist/commands/apps/list.d.ts +7 -0
- package/dist/commands/apps/list.d.ts.map +1 -0
- package/dist/commands/apps/list.js +30 -0
- package/dist/commands/apps/list.js.map +1 -0
- package/dist/commands/apps/update.d.ts +14 -0
- package/dist/commands/apps/update.d.ts.map +1 -0
- package/dist/commands/apps/update.js +262 -0
- package/dist/commands/apps/update.js.map +1 -0
- package/dist/commands/apps/view.d.ts +7 -0
- package/dist/commands/apps/view.d.ts.map +1 -0
- package/dist/commands/apps/view.js +125 -0
- package/dist/commands/apps/view.js.map +1 -0
- package/dist/commands/attachment.d.ts +3 -0
- package/dist/commands/attachment.d.ts.map +1 -0
- package/dist/commands/attachment.js +158 -0
- package/dist/commands/attachment.js.map +1 -0
- package/dist/commands/auth/helpers.d.ts +11 -0
- package/dist/commands/auth/helpers.d.ts.map +1 -0
- package/dist/commands/auth/helpers.js +38 -0
- package/dist/commands/auth/helpers.js.map +1 -0
- package/dist/commands/auth/index.d.ts +3 -0
- package/dist/commands/auth/index.d.ts.map +1 -0
- package/dist/commands/auth/index.js +40 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/auth/login.d.ts +14 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +93 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +11 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +21 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/status.d.ts +18 -0
- package/dist/commands/auth/status.d.ts.map +1 -0
- package/dist/commands/auth/status.js +147 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/auth/store-wrap.d.ts +26 -0
- package/dist/commands/auth/store-wrap.d.ts.map +1 -0
- package/dist/commands/auth/store-wrap.js +49 -0
- package/dist/commands/auth/store-wrap.js.map +1 -0
- package/dist/commands/auth/token.d.ts +5 -0
- package/dist/commands/auth/token.d.ts.map +1 -0
- package/dist/commands/auth/token.js +26 -0
- package/dist/commands/auth/token.js.map +1 -0
- package/dist/commands/backup/download.d.ts +6 -0
- package/dist/commands/backup/download.d.ts.map +1 -0
- package/dist/commands/backup/download.js +28 -0
- package/dist/commands/backup/download.js.map +1 -0
- package/dist/commands/backup/helpers.d.ts +3 -0
- package/dist/commands/backup/helpers.d.ts.map +1 -0
- package/dist/commands/backup/helpers.js +14 -0
- package/dist/commands/backup/helpers.js.map +1 -0
- package/dist/commands/backup/index.d.ts +3 -0
- package/dist/commands/backup/index.d.ts.map +1 -0
- package/dist/commands/backup/index.js +34 -0
- package/dist/commands/backup/index.js.map +1 -0
- package/dist/commands/backup/list.d.ts +7 -0
- package/dist/commands/backup/list.d.ts.map +1 -0
- package/dist/commands/backup/list.js +25 -0
- package/dist/commands/backup/list.js.map +1 -0
- package/dist/commands/billing/format.d.ts +28 -0
- package/dist/commands/billing/format.d.ts.map +1 -0
- package/dist/commands/billing/format.js +89 -0
- package/dist/commands/billing/format.js.map +1 -0
- package/dist/commands/billing/index.d.ts +3 -0
- package/dist/commands/billing/index.d.ts.map +1 -0
- package/dist/commands/billing/index.js +45 -0
- package/dist/commands/billing/index.js.map +1 -0
- package/dist/commands/billing/plan.d.ts +3 -0
- package/dist/commands/billing/plan.d.ts.map +1 -0
- package/dist/commands/billing/plan.js +22 -0
- package/dist/commands/billing/plan.js.map +1 -0
- package/dist/commands/billing/prices.d.ts +3 -0
- package/dist/commands/billing/prices.d.ts.map +1 -0
- package/dist/commands/billing/prices.js +22 -0
- package/dist/commands/billing/prices.js.map +1 -0
- package/dist/commands/billing/pricing.d.ts +7 -0
- package/dist/commands/billing/pricing.d.ts.map +1 -0
- package/dist/commands/billing/pricing.js +43 -0
- package/dist/commands/billing/pricing.js.map +1 -0
- package/dist/commands/billing/subscription.d.ts +3 -0
- package/dist/commands/billing/subscription.d.ts.map +1 -0
- package/dist/commands/billing/subscription.js +37 -0
- package/dist/commands/billing/subscription.js.map +1 -0
- package/dist/commands/changelog.d.ts +3 -0
- package/dist/commands/changelog.d.ts.map +1 -0
- package/dist/commands/changelog.js +13 -0
- package/dist/commands/changelog.js.map +1 -0
- package/dist/commands/comment/add.d.ts +13 -0
- package/dist/commands/comment/add.d.ts.map +1 -0
- package/dist/commands/comment/add.js +149 -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 +20 -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 +24 -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/index.d.ts +3 -0
- package/dist/commands/comment/index.d.ts.map +1 -0
- package/dist/commands/comment/index.js +105 -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 +69 -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 +25 -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 +86 -0
- package/dist/commands/comment/view.js.map +1 -0
- package/dist/commands/completed/index.d.ts +3 -0
- package/dist/commands/completed/index.d.ts.map +1 -0
- package/dist/commands/completed/index.js +29 -0
- package/dist/commands/completed/index.js.map +1 -0
- package/dist/commands/completed/list.d.ts +10 -0
- package/dist/commands/completed/list.d.ts.map +1 -0
- package/dist/commands/completed/list.js +161 -0
- package/dist/commands/completed/list.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 +24 -0
- package/dist/commands/completion/helpers.js.map +1 -0
- package/dist/commands/completion/index.d.ts +3 -0
- 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/config/index.d.ts +3 -0
- package/dist/commands/config/index.d.ts.map +1 -0
- package/dist/commands/config/index.js +16 -0
- package/dist/commands/config/index.js.map +1 -0
- package/dist/commands/config/view.d.ts +6 -0
- package/dist/commands/config/view.d.ts.map +1 -0
- package/dist/commands/config/view.js +180 -0
- package/dist/commands/config/view.js.map +1 -0
- package/dist/commands/doctor.d.ts +16 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +329 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/extension/dispatch.d.ts +22 -0
- package/dist/commands/extension/dispatch.d.ts.map +1 -0
- package/dist/commands/extension/dispatch.js +45 -0
- package/dist/commands/extension/dispatch.js.map +1 -0
- package/dist/commands/extension/doctor.d.ts +10 -0
- package/dist/commands/extension/doctor.d.ts.map +1 -0
- package/dist/commands/extension/doctor.js +110 -0
- package/dist/commands/extension/doctor.js.map +1 -0
- package/dist/commands/extension/index.d.ts +12 -0
- package/dist/commands/extension/index.d.ts.map +1 -0
- package/dist/commands/extension/index.js +80 -0
- package/dist/commands/extension/index.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 +13 -0
- package/dist/commands/filter/create.d.ts.map +1 -0
- package/dist/commands/filter/create.js +77 -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 +22 -0
- package/dist/commands/filter/delete.js.map +1 -0
- package/dist/commands/filter/helpers.d.ts +8 -0
- package/dist/commands/filter/helpers.d.ts.map +1 -0
- package/dist/commands/filter/helpers.js +42 -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 +104 -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 +38 -0
- package/dist/commands/filter/list.js.map +1 -0
- package/dist/commands/filter/update.d.ts +13 -0
- package/dist/commands/filter/update.d.ts.map +1 -0
- package/dist/commands/filter/update.js +73 -0
- package/dist/commands/filter/update.js.map +1 -0
- package/dist/commands/filter/view.d.ts +13 -0
- package/dist/commands/filter/view.d.ts.map +1 -0
- package/dist/commands/filter/view.js +293 -0
- package/dist/commands/filter/view.js.map +1 -0
- package/dist/commands/folder/create.d.ts +11 -0
- package/dist/commands/folder/create.d.ts.map +1 -0
- package/dist/commands/folder/create.js +37 -0
- package/dist/commands/folder/create.js.map +1 -0
- package/dist/commands/folder/delete.d.ts +6 -0
- package/dist/commands/folder/delete.d.ts.map +1 -0
- package/dist/commands/folder/delete.js +21 -0
- package/dist/commands/folder/delete.js.map +1 -0
- package/dist/commands/folder/helpers.d.ts +9 -0
- package/dist/commands/folder/helpers.d.ts.map +1 -0
- package/dist/commands/folder/helpers.js +36 -0
- package/dist/commands/folder/helpers.js.map +1 -0
- package/dist/commands/folder/index.d.ts +3 -0
- package/dist/commands/folder/index.d.ts.map +1 -0
- package/dist/commands/folder/index.js +97 -0
- package/dist/commands/folder/index.js.map +1 -0
- package/dist/commands/folder/list.d.ts +3 -0
- package/dist/commands/folder/list.d.ts.map +1 -0
- package/dist/commands/folder/list.js +48 -0
- package/dist/commands/folder/list.js.map +1 -0
- package/dist/commands/folder/update.d.ts +10 -0
- package/dist/commands/folder/update.d.ts.map +1 -0
- package/dist/commands/folder/update.js +33 -0
- package/dist/commands/folder/update.js.map +1 -0
- package/dist/commands/folder/view.d.ts +8 -0
- package/dist/commands/folder/view.d.ts.map +1 -0
- package/dist/commands/folder/view.js +52 -0
- package/dist/commands/folder/view.js.map +1 -0
- package/dist/commands/hc/index.d.ts +3 -0
- package/dist/commands/hc/index.d.ts.map +1 -0
- package/dist/commands/hc/index.js +70 -0
- package/dist/commands/hc/index.js.map +1 -0
- package/dist/commands/hc/locale.d.ts +3 -0
- package/dist/commands/hc/locale.d.ts.map +1 -0
- package/dist/commands/hc/locale.js +39 -0
- package/dist/commands/hc/locale.js.map +1 -0
- package/dist/commands/hc/locales.d.ts +5 -0
- package/dist/commands/hc/locales.d.ts.map +1 -0
- package/dist/commands/hc/locales.js +18 -0
- package/dist/commands/hc/locales.js.map +1 -0
- package/dist/commands/hc/search.d.ts +8 -0
- package/dist/commands/hc/search.d.ts.map +1 -0
- package/dist/commands/hc/search.js +34 -0
- package/dist/commands/hc/search.js.map +1 -0
- package/dist/commands/hc/view.d.ts +8 -0
- package/dist/commands/hc/view.d.ts.map +1 -0
- package/dist/commands/hc/view.js +49 -0
- package/dist/commands/hc/view.js.map +1 -0
- package/dist/commands/inbox.d.ts +3 -0
- package/dist/commands/inbox.d.ts.map +1 -0
- package/dist/commands/inbox.js +27 -0
- package/dist/commands/inbox.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 +31 -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 +21 -0
- package/dist/commands/label/delete.js.map +1 -0
- package/dist/commands/label/helpers.d.ts +9 -0
- package/dist/commands/label/helpers.d.ts.map +1 -0
- package/dist/commands/label/helpers.js +75 -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 +129 -0
- package/dist/commands/label/index.js.map +1 -0
- package/dist/commands/label/list.d.ts +6 -0
- package/dist/commands/label/list.d.ts.map +1 -0
- package/dist/commands/label/list.js +59 -0
- package/dist/commands/label/list.js.map +1 -0
- package/dist/commands/label/remove-shared.d.ts +5 -0
- package/dist/commands/label/remove-shared.d.ts.map +1 -0
- package/dist/commands/label/remove-shared.js +21 -0
- package/dist/commands/label/remove-shared.js.map +1 -0
- package/dist/commands/label/rename-shared.d.ts +5 -0
- package/dist/commands/label/rename-shared.d.ts.map +1 -0
- package/dist/commands/label/rename-shared.js +16 -0
- package/dist/commands/label/rename-shared.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 +38 -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 +76 -0
- package/dist/commands/label/view.js.map +1 -0
- package/dist/commands/notification/accept.d.ts +4 -0
- package/dist/commands/notification/accept.d.ts.map +1 -0
- package/dist/commands/notification/accept.js +25 -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 +77 -0
- package/dist/commands/notification/helpers.js.map +1 -0
- package/dist/commands/notification/index.d.ts +3 -0
- package/dist/commands/notification/index.d.ts.map +1 -0
- package/dist/commands/notification/index.js +75 -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 +71 -0
- package/dist/commands/notification/list.js.map +1 -0
- package/dist/commands/notification/read.d.ts +8 -0
- package/dist/commands/notification/read.d.ts.map +1 -0
- package/dist/commands/notification/read.js +37 -0
- package/dist/commands/notification/read.js.map +1 -0
- package/dist/commands/notification/reject.d.ts +4 -0
- package/dist/commands/notification/reject.d.ts.map +1 -0
- package/dist/commands/notification/reject.js +25 -0
- package/dist/commands/notification/reject.js.map +1 -0
- package/dist/commands/notification/unread.d.ts +4 -0
- package/dist/commands/notification/unread.d.ts.map +1 -0
- package/dist/commands/notification/unread.js +13 -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 +30 -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 +20 -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/archived.d.ts +3 -0
- package/dist/commands/project/archived.d.ts.map +1 -0
- package/dist/commands/project/archived.js +100 -0
- package/dist/commands/project/archived.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 +3 -0
- package/dist/commands/project/collaborators.d.ts.map +1 -0
- package/dist/commands/project/collaborators.js +109 -0
- package/dist/commands/project/collaborators.js.map +1 -0
- package/dist/commands/project/create.d.ts +14 -0
- package/dist/commands/project/create.d.ts.map +1 -0
- package/dist/commands/project/create.js +57 -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 +30 -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 +32 -0
- package/dist/commands/project/health.js.map +1 -0
- package/dist/commands/project/helpers.d.ts +29 -0
- package/dist/commands/project/helpers.d.ts.map +1 -0
- package/dist/commands/project/helpers.js +79 -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 +336 -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 +35 -0
- package/dist/commands/project/join.js.map +1 -0
- package/dist/commands/project/list.d.ts +8 -0
- package/dist/commands/project/list.d.ts.map +1 -0
- package/dist/commands/project/list.js +130 -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 +88 -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/reorder.d.ts +9 -0
- package/dist/commands/project/reorder.d.ts.map +1 -0
- package/dist/commands/project/reorder.js +75 -0
- package/dist/commands/project/reorder.js.map +1 -0
- package/dist/commands/project/share.d.ts +9 -0
- package/dist/commands/project/share.d.ts.map +1 -0
- package/dist/commands/project/share.js +179 -0
- package/dist/commands/project/share.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 +25 -0
- package/dist/commands/project/unarchive.js.map +1 -0
- package/dist/commands/project/update.d.ts +15 -0
- package/dist/commands/project/update.d.ts.map +1 -0
- package/dist/commands/project/update.js +126 -0
- package/dist/commands/project/update.js.map +1 -0
- package/dist/commands/project/view.d.ts +6 -0
- package/dist/commands/project/view.d.ts.map +1 -0
- package/dist/commands/project/view.js +237 -0
- package/dist/commands/project/view.js.map +1 -0
- package/dist/commands/reminder/add.d.ts +10 -0
- package/dist/commands/reminder/add.d.ts.map +1 -0
- package/dist/commands/reminder/add.js +85 -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 +28 -0
- package/dist/commands/reminder/delete.js.map +1 -0
- package/dist/commands/reminder/get.d.ts +7 -0
- package/dist/commands/reminder/get.d.ts.map +1 -0
- package/dist/commands/reminder/get.js +20 -0
- package/dist/commands/reminder/get.js.map +1 -0
- package/dist/commands/reminder/helpers.d.ts +24 -0
- package/dist/commands/reminder/helpers.d.ts.map +1 -0
- package/dist/commands/reminder/helpers.js +80 -0
- package/dist/commands/reminder/helpers.js.map +1 -0
- package/dist/commands/reminder/index.d.ts +3 -0
- package/dist/commands/reminder/index.d.ts.map +1 -0
- package/dist/commands/reminder/index.js +99 -0
- package/dist/commands/reminder/index.js.map +1 -0
- package/dist/commands/reminder/list.d.ts +9 -0
- package/dist/commands/reminder/list.d.ts.map +1 -0
- package/dist/commands/reminder/list.js +97 -0
- package/dist/commands/reminder/list.js.map +1 -0
- package/dist/commands/reminder/location/add.d.ts +12 -0
- package/dist/commands/reminder/location/add.d.ts.map +1 -0
- package/dist/commands/reminder/location/add.js +60 -0
- package/dist/commands/reminder/location/add.js.map +1 -0
- package/dist/commands/reminder/location/delete.d.ts +7 -0
- package/dist/commands/reminder/location/delete.d.ts.map +1 -0
- package/dist/commands/reminder/location/delete.js +23 -0
- package/dist/commands/reminder/location/delete.js.map +1 -0
- package/dist/commands/reminder/location/get.d.ts +7 -0
- package/dist/commands/reminder/location/get.d.ts.map +1 -0
- package/dist/commands/reminder/location/get.js +18 -0
- package/dist/commands/reminder/location/get.js.map +1 -0
- package/dist/commands/reminder/location/index.d.ts +3 -0
- package/dist/commands/reminder/location/index.d.ts.map +1 -0
- package/dist/commands/reminder/location/index.js +73 -0
- package/dist/commands/reminder/location/index.js.map +1 -0
- package/dist/commands/reminder/location/update.d.ts +12 -0
- package/dist/commands/reminder/location/update.d.ts.map +1 -0
- package/dist/commands/reminder/location/update.js +45 -0
- package/dist/commands/reminder/location/update.js.map +1 -0
- package/dist/commands/reminder/update.d.ts +10 -0
- package/dist/commands/reminder/update.d.ts.map +1 -0
- package/dist/commands/reminder/update.js +59 -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 +21 -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 +11 -0
- package/dist/commands/section/create.d.ts.map +1 -0
- package/dist/commands/section/create.js +45 -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 +27 -0
- package/dist/commands/section/delete.js.map +1 -0
- package/dist/commands/section/index.d.ts +3 -0
- package/dist/commands/section/index.d.ts.map +1 -0
- package/dist/commands/section/index.js +140 -0
- package/dist/commands/section/index.js.map +1 -0
- package/dist/commands/section/list.d.ts +8 -0
- package/dist/commands/section/list.d.ts.map +1 -0
- package/dist/commands/section/list.js +53 -0
- package/dist/commands/section/list.js.map +1 -0
- package/dist/commands/section/reorder.d.ts +11 -0
- package/dist/commands/section/reorder.d.ts.map +1 -0
- package/dist/commands/section/reorder.js +99 -0
- package/dist/commands/section/reorder.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 +21 -0
- package/dist/commands/section/unarchive.js.map +1 -0
- package/dist/commands/section/update.d.ts +10 -0
- package/dist/commands/section/update.d.ts.map +1 -0
- package/dist/commands/section/update.js +53 -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 +184 -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 +48 -0
- package/dist/commands/settings/index.js.map +1 -0
- package/dist/commands/settings/update.d.ts +19 -0
- package/dist/commands/settings/update.d.ts.map +1 -0
- package/dist/commands/settings/update.js +57 -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/index.d.ts +3 -0
- package/dist/commands/skill/index.d.ts.map +1 -0
- package/dist/commands/skill/index.js +47 -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 +24 -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 +44 -0
- package/dist/commands/skill/update.js.map +1 -0
- package/dist/commands/stats/goals.d.ts +9 -0
- package/dist/commands/stats/goals.d.ts.map +1 -0
- package/dist/commands/stats/goals.js +36 -0
- package/dist/commands/stats/goals.js.map +1 -0
- package/dist/commands/stats/helpers.d.ts +11 -0
- package/dist/commands/stats/helpers.d.ts.map +1 -0
- package/dist/commands/stats/helpers.js +88 -0
- package/dist/commands/stats/helpers.js.map +1 -0
- package/dist/commands/stats/index.d.ts +3 -0
- package/dist/commands/stats/index.d.ts.map +1 -0
- package/dist/commands/stats/index.js +26 -0
- package/dist/commands/stats/index.js.map +1 -0
- package/dist/commands/stats/vacation.d.ts +9 -0
- package/dist/commands/stats/vacation.d.ts.map +1 -0
- package/dist/commands/stats/vacation.js +20 -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/status/clear.d.ts +3 -0
- package/dist/commands/status/clear.d.ts.map +1 -0
- package/dist/commands/status/clear.js +21 -0
- package/dist/commands/status/clear.js.map +1 -0
- package/dist/commands/status/index.d.ts +3 -0
- package/dist/commands/status/index.d.ts.map +1 -0
- package/dist/commands/status/index.js +50 -0
- package/dist/commands/status/index.js.map +1 -0
- package/dist/commands/status/set.d.ts +12 -0
- package/dist/commands/status/set.d.ts.map +1 -0
- package/dist/commands/status/set.js +130 -0
- package/dist/commands/status/set.js.map +1 -0
- package/dist/commands/status/view.d.ts +3 -0
- package/dist/commands/status/view.d.ts.map +1 -0
- package/dist/commands/status/view.js +16 -0
- package/dist/commands/status/view.js.map +1 -0
- package/dist/commands/task/add-many-input.d.ts +30 -0
- package/dist/commands/task/add-many-input.d.ts.map +1 -0
- package/dist/commands/task/add-many-input.js +158 -0
- package/dist/commands/task/add-many-input.js.map +1 -0
- package/dist/commands/task/add-many.d.ts +9 -0
- package/dist/commands/task/add-many.d.ts.map +1 -0
- package/dist/commands/task/add-many.js +479 -0
- package/dist/commands/task/add-many.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 +120 -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 +37 -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 +21 -0
- package/dist/commands/task/delete.js.map +1 -0
- package/dist/commands/task/helpers.d.ts +8 -0
- package/dist/commands/task/helpers.d.ts.map +1 -0
- package/dist/commands/task/helpers.js +23 -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 +286 -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 +54 -0
- package/dist/commands/task/move.js.map +1 -0
- package/dist/commands/task/quickadd.d.ts +8 -0
- package/dist/commands/task/quickadd.d.ts.map +1 -0
- package/dist/commands/task/quickadd.js +37 -0
- package/dist/commands/task/quickadd.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 +40 -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 +21 -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 +95 -0
- package/dist/commands/task/update.js.map +1 -0
- package/dist/commands/task/view.d.ts +5 -0
- package/dist/commands/task/view.d.ts.map +1 -0
- package/dist/commands/task/view.js +45 -0
- package/dist/commands/task/view.js.map +1 -0
- package/dist/commands/template/create.d.ts +10 -0
- package/dist/commands/template/create.d.ts.map +1 -0
- package/dist/commands/template/create.js +45 -0
- package/dist/commands/template/create.js.map +1 -0
- package/dist/commands/template/export-file.d.ts +8 -0
- package/dist/commands/template/export-file.d.ts.map +1 -0
- package/dist/commands/template/export-file.js +26 -0
- package/dist/commands/template/export-file.js.map +1 -0
- package/dist/commands/template/export-url.d.ts +7 -0
- package/dist/commands/template/export-url.d.ts.map +1 -0
- package/dist/commands/template/export-url.js +19 -0
- package/dist/commands/template/export-url.js.map +1 -0
- package/dist/commands/template/helpers.d.ts +3 -0
- package/dist/commands/template/helpers.d.ts.map +1 -0
- package/dist/commands/template/helpers.js +17 -0
- package/dist/commands/template/helpers.js.map +1 -0
- package/dist/commands/template/import-file.d.ts +9 -0
- package/dist/commands/template/import-file.d.ts.map +1 -0
- package/dist/commands/template/import-file.js +33 -0
- package/dist/commands/template/import-file.js.map +1 -0
- package/dist/commands/template/import-id.d.ts +9 -0
- package/dist/commands/template/import-id.d.ts.map +1 -0
- package/dist/commands/template/import-id.js +31 -0
- package/dist/commands/template/import-id.js.map +1 -0
- package/dist/commands/template/index.d.ts +3 -0
- package/dist/commands/template/index.d.ts.map +1 -0
- package/dist/commands/template/index.js +98 -0
- package/dist/commands/template/index.js.map +1 -0
- package/dist/commands/today.d.ts +11 -0
- package/dist/commands/today.d.ts.map +1 -0
- package/dist/commands/today.js +116 -0
- package/dist/commands/today.js.map +1 -0
- package/dist/commands/upcoming.d.ts +11 -0
- package/dist/commands/upcoming.d.ts.map +1 -0
- package/dist/commands/upcoming.js +138 -0
- package/dist/commands/upcoming.js.map +1 -0
- package/dist/commands/update/index.d.ts +3 -0
- package/dist/commands/update/index.d.ts.map +1 -0
- package/dist/commands/update/index.js +14 -0
- package/dist/commands/update/index.js.map +1 -0
- package/dist/commands/user/aliases.d.ts +11 -0
- package/dist/commands/user/aliases.d.ts.map +1 -0
- package/dist/commands/user/aliases.js +11 -0
- package/dist/commands/user/aliases.js.map +1 -0
- package/dist/commands/user/current.d.ts +16 -0
- package/dist/commands/user/current.d.ts.map +1 -0
- package/dist/commands/user/current.js +61 -0
- package/dist/commands/user/current.js.map +1 -0
- package/dist/commands/user/index.d.ts +3 -0
- package/dist/commands/user/index.d.ts.map +1 -0
- package/dist/commands/user/index.js +30 -0
- package/dist/commands/user/index.js.map +1 -0
- package/dist/commands/user/list.d.ts +15 -0
- package/dist/commands/user/list.d.ts.map +1 -0
- package/dist/commands/user/list.js +37 -0
- package/dist/commands/user/list.js.map +1 -0
- package/dist/commands/user/project-account.d.ts +17 -0
- package/dist/commands/user/project-account.d.ts.map +1 -0
- package/dist/commands/user/project-account.js +18 -0
- package/dist/commands/user/project-account.js.map +1 -0
- package/dist/commands/user/remove.d.ts +13 -0
- package/dist/commands/user/remove.d.ts.map +1 -0
- package/dist/commands/user/remove.js +31 -0
- package/dist/commands/user/remove.js.map +1 -0
- package/dist/commands/user/use.d.ts +11 -0
- package/dist/commands/user/use.d.ts.map +1 -0
- package/dist/commands/user/use.js +15 -0
- package/dist/commands/user/use.js.map +1 -0
- package/dist/commands/view.d.ts +3 -0
- package/dist/commands/view.d.ts.map +1 -0
- package/dist/commands/view.js +84 -0
- package/dist/commands/view.js.map +1 -0
- package/dist/commands/workspace/activity.d.ts +9 -0
- package/dist/commands/workspace/activity.d.ts.map +1 -0
- package/dist/commands/workspace/activity.js +93 -0
- package/dist/commands/workspace/activity.js.map +1 -0
- package/dist/commands/workspace/create.d.ts +14 -0
- package/dist/commands/workspace/create.d.ts.map +1 -0
- package/dist/commands/workspace/create.js +58 -0
- package/dist/commands/workspace/create.js.map +1 -0
- package/dist/commands/workspace/delete.d.ts +5 -0
- package/dist/commands/workspace/delete.d.ts.map +1 -0
- package/dist/commands/workspace/delete.js +31 -0
- package/dist/commands/workspace/delete.js.map +1 -0
- package/dist/commands/workspace/helpers.d.ts +30 -0
- package/dist/commands/workspace/helpers.d.ts.map +1 -0
- package/dist/commands/workspace/helpers.js +118 -0
- package/dist/commands/workspace/helpers.js.map +1 -0
- package/dist/commands/workspace/index.d.ts +3 -0
- package/dist/commands/workspace/index.d.ts.map +1 -0
- package/dist/commands/workspace/index.js +178 -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 +53 -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 +105 -0
- package/dist/commands/workspace/projects.js.map +1 -0
- package/dist/commands/workspace/update.d.ts +15 -0
- package/dist/commands/workspace/update.d.ts.map +1 -0
- package/dist/commands/workspace/update.js +75 -0
- package/dist/commands/workspace/update.js.map +1 -0
- package/dist/commands/workspace/use.d.ts +5 -0
- package/dist/commands/workspace/use.d.ts.map +1 -0
- package/dist/commands/workspace/use.js +46 -0
- package/dist/commands/workspace/use.js.map +1 -0
- package/dist/commands/workspace/user-tasks.d.ts +10 -0
- package/dist/commands/workspace/user-tasks.d.ts.map +1 -0
- package/dist/commands/workspace/user-tasks.js +83 -0
- package/dist/commands/workspace/user-tasks.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 +102 -0
- package/dist/commands/workspace/users.js.map +1 -0
- package/dist/commands/workspace/view.d.ts +5 -0
- package/dist/commands/workspace/view.d.ts.map +1 -0
- package/dist/commands/workspace/view.js +34 -0
- package/dist/commands/workspace/view.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +387 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api/core.d.ts +32 -0
- package/dist/lib/api/core.d.ts.map +1 -0
- package/dist/lib/api/core.js +461 -0
- package/dist/lib/api/core.js.map +1 -0
- package/dist/lib/api/filters.d.ts +59 -0
- package/dist/lib/api/filters.d.ts.map +1 -0
- package/dist/lib/api/filters.js +134 -0
- package/dist/lib/api/filters.js.map +1 -0
- package/dist/lib/api/notifications.d.ts +33 -0
- package/dist/lib/api/notifications.d.ts.map +1 -0
- package/dist/lib/api/notifications.js +92 -0
- package/dist/lib/api/notifications.js.map +1 -0
- package/dist/lib/api/projects-sync.d.ts +8 -0
- package/dist/lib/api/projects-sync.d.ts.map +1 -0
- package/dist/lib/api/projects-sync.js +21 -0
- package/dist/lib/api/projects-sync.js.map +1 -0
- package/dist/lib/api/reminders.d.ts +54 -0
- package/dist/lib/api/reminders.d.ts.map +1 -0
- package/dist/lib/api/reminders.js +120 -0
- package/dist/lib/api/reminders.js.map +1 -0
- package/dist/lib/api/sections-sync.d.ts +5 -0
- package/dist/lib/api/sections-sync.d.ts.map +1 -0
- package/dist/lib/api/sections-sync.js +9 -0
- package/dist/lib/api/sections-sync.js.map +1 -0
- package/dist/lib/api/stats.d.ts +10 -0
- package/dist/lib/api/stats.d.ts.map +1 -0
- package/dist/lib/api/stats.js +23 -0
- package/dist/lib/api/stats.js.map +1 -0
- package/dist/lib/api/user-settings.d.ts +34 -0
- package/dist/lib/api/user-settings.d.ts.map +1 -0
- package/dist/lib/api/user-settings.js +59 -0
- package/dist/lib/api/user-settings.js.map +1 -0
- package/dist/lib/api/user-status.d.ts +9 -0
- package/dist/lib/api/user-status.d.ts.map +1 -0
- package/dist/lib/api/user-status.js +28 -0
- package/dist/lib/api/user-status.js.map +1 -0
- package/dist/lib/api/workspaces.d.ts +23 -0
- package/dist/lib/api/workspaces.d.ts.map +1 -0
- package/dist/lib/api/workspaces.js +61 -0
- package/dist/lib/api/workspaces.js.map +1 -0
- package/dist/lib/app-name.d.ts +8 -0
- package/dist/lib/app-name.d.ts.map +1 -0
- package/dist/lib/app-name.js +8 -0
- package/dist/lib/app-name.js.map +1 -0
- package/dist/lib/auth-flags.d.ts +19 -0
- package/dist/lib/auth-flags.d.ts.map +1 -0
- package/dist/lib/auth-flags.js +33 -0
- package/dist/lib/auth-flags.js.map +1 -0
- package/dist/lib/auth-html.d.ts +11 -0
- package/dist/lib/auth-html.d.ts.map +1 -0
- package/dist/lib/auth-html.js +434 -0
- package/dist/lib/auth-html.js.map +1 -0
- package/dist/lib/auth-provider.d.ts +16 -0
- package/dist/lib/auth-provider.d.ts.map +1 -0
- package/dist/lib/auth-provider.js +59 -0
- package/dist/lib/auth-provider.js.map +1 -0
- package/dist/lib/auth-store.d.ts +82 -0
- package/dist/lib/auth-store.d.ts.map +1 -0
- package/dist/lib/auth-store.js +119 -0
- package/dist/lib/auth-store.js.map +1 -0
- package/dist/lib/auth.d.ts +52 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +106 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/browser.d.ts +11 -0
- package/dist/lib/browser.d.ts.map +1 -0
- package/dist/lib/browser.js +7 -0
- package/dist/lib/browser.js.map +1 -0
- package/dist/lib/children.d.ts +44 -0
- package/dist/lib/children.d.ts.map +1 -0
- package/dist/lib/children.js +78 -0
- package/dist/lib/children.js.map +1 -0
- package/dist/lib/collaborators.d.ts +57 -0
- package/dist/lib/collaborators.d.ts.map +1 -0
- package/dist/lib/collaborators.js +273 -0
- package/dist/lib/collaborators.js.map +1 -0
- package/dist/lib/command-schema.d.ts +6 -0
- package/dist/lib/command-schema.d.ts.map +1 -0
- package/dist/lib/command-schema.js +56 -0
- package/dist/lib/command-schema.js.map +1 -0
- package/dist/lib/comment-recipients.d.ts +24 -0
- package/dist/lib/comment-recipients.d.ts.map +1 -0
- package/dist/lib/comment-recipients.js +57 -0
- package/dist/lib/comment-recipients.js.map +1 -0
- package/dist/lib/completion.d.ts +41 -0
- package/dist/lib/completion.d.ts.map +1 -0
- package/dist/lib/completion.js +192 -0
- package/dist/lib/completion.js.map +1 -0
- package/dist/lib/config.d.ts +86 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +254 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/constants.d.ts +9 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +9 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/dates.d.ts +25 -0
- package/dist/lib/dates.d.ts.map +1 -0
- package/dist/lib/dates.js +106 -0
- package/dist/lib/dates.js.map +1 -0
- package/dist/lib/duration.d.ts +19 -0
- package/dist/lib/duration.d.ts.map +1 -0
- package/dist/lib/duration.js +73 -0
- package/dist/lib/duration.js.map +1 -0
- package/dist/lib/errors.d.ts +41 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +37 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/global-args.d.ts +35 -0
- package/dist/lib/global-args.d.ts.map +1 -0
- package/dist/lib/global-args.js +127 -0
- package/dist/lib/global-args.js.map +1 -0
- package/dist/lib/help-center.d.ts +79 -0
- package/dist/lib/help-center.d.ts.map +1 -0
- package/dist/lib/help-center.js +485 -0
- package/dist/lib/help-center.js.map +1 -0
- package/dist/lib/labels.d.ts +2 -0
- package/dist/lib/labels.d.ts.map +1 -0
- package/dist/lib/labels.js +9 -0
- package/dist/lib/labels.js.map +1 -0
- package/dist/lib/local-file.d.ts +37 -0
- package/dist/lib/local-file.d.ts.map +1 -0
- package/dist/lib/local-file.js +59 -0
- package/dist/lib/local-file.js.map +1 -0
- package/dist/lib/logger.d.ts +53 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +233 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/markdown.d.ts +3 -0
- package/dist/lib/markdown.d.ts.map +1 -0
- package/dist/lib/markdown.js +16 -0
- package/dist/lib/markdown.js.map +1 -0
- package/dist/lib/migrate-auth.d.ts +27 -0
- package/dist/lib/migrate-auth.d.ts.map +1 -0
- package/dist/lib/migrate-auth.js +105 -0
- package/dist/lib/migrate-auth.js.map +1 -0
- package/dist/lib/missing-argument.d.ts +10 -0
- package/dist/lib/missing-argument.d.ts.map +1 -0
- package/dist/lib/missing-argument.js +27 -0
- package/dist/lib/missing-argument.js.map +1 -0
- package/dist/lib/mutation-json.d.ts +3 -0
- package/dist/lib/mutation-json.d.ts.map +1 -0
- package/dist/lib/mutation-json.js +83 -0
- package/dist/lib/mutation-json.js.map +1 -0
- package/dist/lib/oauth-scopes.d.ts +66 -0
- package/dist/lib/oauth-scopes.d.ts.map +1 -0
- package/dist/lib/oauth-scopes.js +112 -0
- package/dist/lib/oauth-scopes.js.map +1 -0
- package/dist/lib/options.d.ts +17 -0
- package/dist/lib/options.d.ts.map +1 -0
- package/dist/lib/options.js +2 -0
- package/dist/lib/options.js.map +1 -0
- package/dist/lib/order.d.ts +2 -0
- package/dist/lib/order.d.ts.map +1 -0
- package/dist/lib/order.js +11 -0
- package/dist/lib/order.js.map +1 -0
- package/dist/lib/output.d.ts +84 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +509 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/pagination.d.ts +23 -0
- package/dist/lib/pagination.d.ts.map +1 -0
- package/dist/lib/pagination.js +26 -0
- package/dist/lib/pagination.js.map +1 -0
- package/dist/lib/permissions.d.ts +6 -0
- package/dist/lib/permissions.d.ts.map +1 -0
- package/dist/lib/permissions.js +113 -0
- package/dist/lib/permissions.js.map +1 -0
- package/dist/lib/progress.d.ts +29 -0
- package/dist/lib/progress.d.ts.map +1 -0
- package/dist/lib/progress.js +84 -0
- package/dist/lib/progress.js.map +1 -0
- package/dist/lib/project-limit.d.ts +13 -0
- package/dist/lib/project-limit.d.ts.map +1 -0
- package/dist/lib/project-limit.js +18 -0
- package/dist/lib/project-limit.js.map +1 -0
- package/dist/lib/refs.d.ts +86 -0
- package/dist/lib/refs.d.ts.map +1 -0
- package/dist/lib/refs.js +337 -0
- package/dist/lib/refs.js.map +1 -0
- package/dist/lib/reorder.d.ts +7 -0
- package/dist/lib/reorder.d.ts.map +1 -0
- package/dist/lib/reorder.js +11 -0
- package/dist/lib/reorder.js.map +1 -0
- package/dist/lib/root-options.d.ts +14 -0
- package/dist/lib/root-options.d.ts.map +1 -0
- package/dist/lib/root-options.js +14 -0
- package/dist/lib/root-options.js.map +1 -0
- package/dist/lib/skills/content.d.ts +5 -0
- package/dist/lib/skills/content.d.ts.map +1 -0
- package/dist/lib/skills/content.js +490 -0
- package/dist/lib/skills/content.js.map +1 -0
- package/dist/lib/skills/create-installer.d.ts +13 -0
- package/dist/lib/skills/create-installer.d.ts.map +1 -0
- package/dist/lib/skills/create-installer.js +139 -0
- package/dist/lib/skills/create-installer.js.map +1 -0
- package/dist/lib/skills/index.d.ts +6 -0
- package/dist/lib/skills/index.d.ts.map +1 -0
- package/dist/lib/skills/index.js +50 -0
- package/dist/lib/skills/index.js.map +1 -0
- package/dist/lib/skills/refresh-on-upgrade.d.ts +19 -0
- package/dist/lib/skills/refresh-on-upgrade.d.ts.map +1 -0
- package/dist/lib/skills/refresh-on-upgrade.js +67 -0
- package/dist/lib/skills/refresh-on-upgrade.js.map +1 -0
- package/dist/lib/skills/types.d.ts +14 -0
- package/dist/lib/skills/types.d.ts.map +1 -0
- package/dist/lib/skills/types.js +2 -0
- package/dist/lib/skills/types.js.map +1 -0
- package/dist/lib/skills/update-installed.d.ts +7 -0
- package/dist/lib/skills/update-installed.d.ts.map +1 -0
- package/dist/lib/skills/update-installed.js +23 -0
- package/dist/lib/skills/update-installed.js.map +1 -0
- package/dist/lib/spinner.d.ts +5 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +12 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/status.d.ts +4 -0
- package/dist/lib/status.d.ts.map +1 -0
- package/dist/lib/status.js +16 -0
- package/dist/lib/status.js.map +1 -0
- package/dist/lib/task-list.d.ts +39 -0
- package/dist/lib/task-list.d.ts.map +1 -0
- package/dist/lib/task-list.js +287 -0
- package/dist/lib/task-list.js.map +1 -0
- package/dist/lib/task-sort.d.ts +92 -0
- package/dist/lib/task-sort.d.ts.map +1 -0
- package/dist/lib/task-sort.js +248 -0
- package/dist/lib/task-sort.js.map +1 -0
- package/dist/lib/text.d.ts +33 -0
- package/dist/lib/text.d.ts.map +1 -0
- package/dist/lib/text.js +43 -0
- package/dist/lib/text.js.map +1 -0
- package/dist/lib/update.d.ts +11 -0
- package/dist/lib/update.d.ts.map +1 -0
- package/dist/lib/update.js +18 -0
- package/dist/lib/update.js.map +1 -0
- package/dist/lib/urls.d.ts +9 -0
- package/dist/lib/urls.d.ts.map +1 -0
- package/dist/lib/urls.js +34 -0
- package/dist/lib/urls.js.map +1 -0
- package/dist/lib/usage-tracking.d.ts +9 -0
- package/dist/lib/usage-tracking.d.ts.map +1 -0
- package/dist/lib/usage-tracking.js +95 -0
- package/dist/lib/usage-tracking.js.map +1 -0
- package/dist/lib/user-records.d.ts +17 -0
- package/dist/lib/user-records.d.ts.map +1 -0
- package/dist/lib/user-records.js +84 -0
- package/dist/lib/user-records.js.map +1 -0
- package/dist/lib/users.d.ts +54 -0
- package/dist/lib/users.d.ts.map +1 -0
- package/dist/lib/users.js +114 -0
- package/dist/lib/users.js.map +1 -0
- package/dist/lib/view-options.d.ts +30 -0
- package/dist/lib/view-options.d.ts.map +1 -0
- package/dist/lib/view-options.js +108 -0
- package/dist/lib/view-options.js.map +1 -0
- package/dist/postinstall.d.ts +2 -0
- package/dist/postinstall.d.ts.map +1 -0
- package/dist/postinstall.js +5 -0
- package/dist/postinstall.js.map +1 -0
- package/package.json +79 -6
- package/scripts/check-skill-sync.js +40 -0
- package/scripts/postinstall.js +12 -0
- package/scripts/sync-skill.js +28 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { getApi } from '../../lib/api/core.js';
|
|
3
|
+
import { resolveAppRef } from '../../lib/refs.js';
|
|
4
|
+
import { appInstallUrl } from '../../lib/urls.js';
|
|
5
|
+
import { parseOAuthRedirectUris } from './helpers.js';
|
|
6
|
+
const HIDDEN_HINT = '(hidden — pass --include-secrets to reveal)';
|
|
7
|
+
function hiddenLine(label) {
|
|
8
|
+
return ` ${label}${chalk.dim(HIDDEN_HINT)}`;
|
|
9
|
+
}
|
|
10
|
+
// Renders a UI extension's type alongside its variant-specific sub-type, e.g.
|
|
11
|
+
// "context-menu: project" or "composer: task". Settings extensions have no sub-type.
|
|
12
|
+
// Branches are exhaustive over the SDK's UiExtension union so a new variant fails to
|
|
13
|
+
// compile (via the `never` fallback) rather than silently rendering a partial label.
|
|
14
|
+
function formatExtensionType(ext) {
|
|
15
|
+
switch (ext.extensionType) {
|
|
16
|
+
case 'context-menu':
|
|
17
|
+
return `${ext.extensionType}: ${ext.contextType}`;
|
|
18
|
+
case 'composer':
|
|
19
|
+
return `${ext.extensionType}: ${ext.composerType}`;
|
|
20
|
+
case 'settings':
|
|
21
|
+
return ext.extensionType;
|
|
22
|
+
default: {
|
|
23
|
+
const _exhaustive = ext;
|
|
24
|
+
return _exhaustive;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export async function viewApp(ref, options = {}) {
|
|
29
|
+
const api = await getApi();
|
|
30
|
+
const app = await resolveAppRef(api, ref);
|
|
31
|
+
const revealSecrets = Boolean(options.includeSecrets);
|
|
32
|
+
// Secret-bearing endpoints (getAppSecrets for clientSecret, verification and test
|
|
33
|
+
// tokens) are gated on `revealSecrets` so we never transport secret data onto the
|
|
34
|
+
// user's machine unless they asked for it.
|
|
35
|
+
const [webhook, uiExtensions, secrets, verification, testToken] = await Promise.all([
|
|
36
|
+
api.getAppWebhook(app.id),
|
|
37
|
+
api.getUiExtensionsForApp(app.id),
|
|
38
|
+
revealSecrets ? api.getAppSecrets(app.id) : Promise.resolve(null),
|
|
39
|
+
revealSecrets ? api.getAppVerificationToken(app.id) : Promise.resolve(null),
|
|
40
|
+
revealSecrets ? api.getAppTestToken(app.id) : Promise.resolve(null),
|
|
41
|
+
]);
|
|
42
|
+
// The distribution token underpins the shareable install URL — not a secret, but
|
|
43
|
+
// only relevant when the app has UI extensions (plain output) or for the full JSON
|
|
44
|
+
// payload, so we skip the call entirely in the common no-extensions plain path.
|
|
45
|
+
const wantsJson = Boolean(options.json || options.ndjson);
|
|
46
|
+
const distribution = wantsJson || uiExtensions.length > 0 ? await api.getAppDistributionToken(app.id) : null;
|
|
47
|
+
const distributionToken = distribution?.distributionToken ?? null;
|
|
48
|
+
const installUrl = uiExtensions.length > 0 && distributionToken ? appInstallUrl(distributionToken) : null;
|
|
49
|
+
if (options.json || options.ndjson) {
|
|
50
|
+
const payload = {
|
|
51
|
+
...app,
|
|
52
|
+
webhook,
|
|
53
|
+
uiExtensions,
|
|
54
|
+
distributionToken,
|
|
55
|
+
installUrl,
|
|
56
|
+
};
|
|
57
|
+
if (revealSecrets && secrets) {
|
|
58
|
+
payload.clientSecret = secrets.clientSecret;
|
|
59
|
+
payload.verificationToken = verification?.verificationToken ?? null;
|
|
60
|
+
payload.testToken = { accessToken: testToken?.accessToken ?? null };
|
|
61
|
+
}
|
|
62
|
+
const indent = options.json ? 2 : undefined;
|
|
63
|
+
console.log(JSON.stringify(payload, null, indent));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const created = app.createdAt.toISOString().slice(0, 10);
|
|
67
|
+
const scopes = app.appTokenScopes && app.appTokenScopes.length > 0
|
|
68
|
+
? app.appTokenScopes.join(', ')
|
|
69
|
+
: '(none)';
|
|
70
|
+
console.log(chalk.bold(app.displayName));
|
|
71
|
+
console.log('');
|
|
72
|
+
console.log(` ID: ${app.id}`);
|
|
73
|
+
console.log(` Status: ${app.status}`);
|
|
74
|
+
console.log(` Users: ${app.userCount}`);
|
|
75
|
+
console.log(` Created: ${created}`);
|
|
76
|
+
console.log(` Service URL: ${app.serviceUrl || '(none)'}`);
|
|
77
|
+
const oauthUris = parseOAuthRedirectUris(app.oauthRedirectUri);
|
|
78
|
+
if (oauthUris.length === 0) {
|
|
79
|
+
console.log(` OAuth redirect: (none)`);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
console.log(` OAuth redirect: ${oauthUris[0]}`);
|
|
83
|
+
for (const uri of oauthUris.slice(1)) {
|
|
84
|
+
console.log(` ${uri}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
console.log(` Token scopes: ${scopes}`);
|
|
88
|
+
if (app.iconMd) {
|
|
89
|
+
console.log(` Icon: ${chalk.dim(app.iconMd)}`);
|
|
90
|
+
}
|
|
91
|
+
console.log('');
|
|
92
|
+
console.log(` Client ID: ${app.clientId}`);
|
|
93
|
+
if (revealSecrets && secrets) {
|
|
94
|
+
console.log(` Client secret: ${secrets.clientSecret}`);
|
|
95
|
+
console.log(` Verification token: ${verification?.verificationToken ?? '(none)'}`);
|
|
96
|
+
const accessToken = testToken?.accessToken;
|
|
97
|
+
console.log(` Test token: ${accessToken == null ? chalk.dim('(not created)') : accessToken}`);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
console.log(hiddenLine('Client secret: '));
|
|
101
|
+
console.log(hiddenLine('Verification token: '));
|
|
102
|
+
console.log(hiddenLine('Test token: '));
|
|
103
|
+
}
|
|
104
|
+
if (webhook === null) {
|
|
105
|
+
console.log(` Webhook: ${chalk.dim('(not configured)')}`);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
console.log(` Webhook: ${webhook.status} — ${webhook.callbackUrl}`);
|
|
109
|
+
console.log(` Webhook events: ${webhook.events.join(', ') || '(none)'}`);
|
|
110
|
+
console.log(` Webhook version: ${webhook.version}`);
|
|
111
|
+
}
|
|
112
|
+
if (uiExtensions.length > 0) {
|
|
113
|
+
const [first, ...rest] = uiExtensions;
|
|
114
|
+
console.log(` UI extensions: ${first.name} (${formatExtensionType(first)})`);
|
|
115
|
+
for (const ext of rest) {
|
|
116
|
+
console.log(` ${ext.name} (${formatExtensionType(ext)})`);
|
|
117
|
+
}
|
|
118
|
+
if (installUrl) {
|
|
119
|
+
console.log(` Install URL: ${installUrl}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
console.log('');
|
|
123
|
+
console.log(app.description ?? chalk.dim('(no description)'));
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../src/commands/apps/view.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAQrD,MAAM,WA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@@
|
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../src/commands/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAiLnC,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAchE"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { getApi } from '../lib/api/core.js';
|
|
2
|
+
import { CliError } from '../lib/errors.js';
|
|
3
|
+
import { failWithUsage } from '../lib/missing-argument.js';
|
|
4
|
+
import { formatFileSize } from '../lib/output.js';
|
|
5
|
+
const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10MB
|
|
6
|
+
const IMAGE_MIME_TYPES = new Set([
|
|
7
|
+
'image/png',
|
|
8
|
+
'image/jpeg',
|
|
9
|
+
'image/gif',
|
|
10
|
+
'image/webp',
|
|
11
|
+
'image/svg+xml',
|
|
12
|
+
]);
|
|
13
|
+
const TEXT_MIME_TYPES = new Set([
|
|
14
|
+
'text/plain',
|
|
15
|
+
'text/csv',
|
|
16
|
+
'text/html',
|
|
17
|
+
'text/markdown',
|
|
18
|
+
'application/json',
|
|
19
|
+
'application/xml',
|
|
20
|
+
'text/xml',
|
|
21
|
+
]);
|
|
22
|
+
const EXTENSION_TO_MIME = {
|
|
23
|
+
'.png': 'image/png',
|
|
24
|
+
'.jpg': 'image/jpeg',
|
|
25
|
+
'.jpeg': 'image/jpeg',
|
|
26
|
+
'.gif': 'image/gif',
|
|
27
|
+
'.webp': 'image/webp',
|
|
28
|
+
'.svg': 'image/svg+xml',
|
|
29
|
+
'.txt': 'text/plain',
|
|
30
|
+
'.csv': 'text/csv',
|
|
31
|
+
'.html': 'text/html',
|
|
32
|
+
'.md': 'text/markdown',
|
|
33
|
+
'.json': 'application/json',
|
|
34
|
+
'.xml': 'application/xml',
|
|
35
|
+
'.pdf': 'application/pdf',
|
|
36
|
+
};
|
|
37
|
+
function parseMimeType(contentType) {
|
|
38
|
+
const base = contentType.split(';')[0];
|
|
39
|
+
return (base ?? contentType).trim().toLowerCase();
|
|
40
|
+
}
|
|
41
|
+
function parseCharset(contentType) {
|
|
42
|
+
const match = contentType.match(/charset\s*=\s*"?([^";,\s]+)"?/i);
|
|
43
|
+
return match?.[1]?.toLowerCase();
|
|
44
|
+
}
|
|
45
|
+
function getMimeTypeFromUrl(url) {
|
|
46
|
+
try {
|
|
47
|
+
const pathname = new URL(url).pathname;
|
|
48
|
+
const lastDot = pathname.lastIndexOf('.');
|
|
49
|
+
if (lastDot === -1)
|
|
50
|
+
return undefined;
|
|
51
|
+
const ext = pathname.slice(lastDot).toLowerCase();
|
|
52
|
+
return EXTENSION_TO_MIME[ext];
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function getFileNameFromUrl(url) {
|
|
59
|
+
try {
|
|
60
|
+
const pathname = new URL(url).pathname;
|
|
61
|
+
const lastSlash = pathname.lastIndexOf('/');
|
|
62
|
+
if (lastSlash === -1)
|
|
63
|
+
return undefined;
|
|
64
|
+
const name = pathname.slice(lastSlash + 1);
|
|
65
|
+
return name ? decodeURIComponent(name) : undefined;
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function getContentCategory(mimeType) {
|
|
72
|
+
if (IMAGE_MIME_TYPES.has(mimeType))
|
|
73
|
+
return 'image';
|
|
74
|
+
if (TEXT_MIME_TYPES.has(mimeType) || mimeType.startsWith('text/'))
|
|
75
|
+
return 'text';
|
|
76
|
+
return 'binary';
|
|
77
|
+
}
|
|
78
|
+
async function viewAttachment(url, options) {
|
|
79
|
+
const api = await getApi();
|
|
80
|
+
const response = await api.viewAttachment(url);
|
|
81
|
+
if (!response.ok) {
|
|
82
|
+
throw new CliError('FETCH_FAILED', `Failed to fetch attachment: ${response.status} ${response.statusText}`);
|
|
83
|
+
}
|
|
84
|
+
const fileName = getFileNameFromUrl(url) ?? 'unknown';
|
|
85
|
+
// Determine MIME type from Content-Type header, fall back to URL extension
|
|
86
|
+
const rawContentType = response.headers['content-type'];
|
|
87
|
+
const headerMime = rawContentType ? parseMimeType(rawContentType) : undefined;
|
|
88
|
+
const mimeType = headerMime && headerMime !== 'application/octet-stream'
|
|
89
|
+
? headerMime
|
|
90
|
+
: (getMimeTypeFromUrl(url) ?? headerMime ?? 'application/octet-stream');
|
|
91
|
+
// Check content-length header before reading body
|
|
92
|
+
const contentLength = response.headers['content-length'];
|
|
93
|
+
const headerFileSize = contentLength ? Number.parseInt(contentLength, 10) : undefined;
|
|
94
|
+
if (headerFileSize && headerFileSize > MAX_FILE_SIZE) {
|
|
95
|
+
throw new CliError('FILE_TOO_LARGE', `Attachment "${fileName}" is too large (${formatFileSize(headerFileSize)}, limit is ${formatFileSize(MAX_FILE_SIZE)})`);
|
|
96
|
+
}
|
|
97
|
+
const category = getContentCategory(mimeType);
|
|
98
|
+
// Always read as arrayBuffer for accurate size and charset-aware decoding
|
|
99
|
+
const buffer = Buffer.from(await response.arrayBuffer());
|
|
100
|
+
const fileSize = buffer.byteLength;
|
|
101
|
+
if (fileSize > MAX_FILE_SIZE) {
|
|
102
|
+
throw new CliError('FILE_TOO_LARGE', `Attachment "${fileName}" is too large (${formatFileSize(fileSize)}, limit is ${formatFileSize(MAX_FILE_SIZE)})`);
|
|
103
|
+
}
|
|
104
|
+
let content;
|
|
105
|
+
let encoding;
|
|
106
|
+
if (category === 'text') {
|
|
107
|
+
const charset = (rawContentType ? parseCharset(rawContentType) : undefined) ?? 'utf-8';
|
|
108
|
+
try {
|
|
109
|
+
const decoder = new TextDecoder(charset, { fatal: true });
|
|
110
|
+
content = decoder.decode(buffer);
|
|
111
|
+
encoding = charset;
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
// Unsupported or invalid charset — fall back to base64
|
|
115
|
+
content = buffer.toString('base64');
|
|
116
|
+
encoding = 'base64';
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
content = buffer.toString('base64');
|
|
121
|
+
encoding = 'base64';
|
|
122
|
+
}
|
|
123
|
+
if (options.json) {
|
|
124
|
+
console.log(JSON.stringify({
|
|
125
|
+
fileName,
|
|
126
|
+
fileSize,
|
|
127
|
+
contentType: mimeType,
|
|
128
|
+
contentCategory: category,
|
|
129
|
+
encoding,
|
|
130
|
+
content,
|
|
131
|
+
}, null, 2));
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
// Default mode: metadata to stderr, content to stdout
|
|
135
|
+
process.stderr.write(`Attachment: ${fileName} (${mimeType}, ${formatFileSize(fileSize)})\n`);
|
|
136
|
+
if (encoding === 'base64') {
|
|
137
|
+
process.stderr.write('Encoding: base64\n');
|
|
138
|
+
console.log(content);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
process.stdout.write(content);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export function registerAttachmentCommand(program) {
|
|
145
|
+
const attachment = program.command('attachment').description('Manage file attachments');
|
|
146
|
+
attachment
|
|
147
|
+
.command('view [url]', { isDefault: true })
|
|
148
|
+
.description('View/download a file attachment by URL')
|
|
149
|
+
.option('--json', 'Output as JSON with metadata and content')
|
|
150
|
+
.action((url, options) => {
|
|
151
|
+
if (!url) {
|
|
152
|
+
failWithUsage(attachment);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
return viewAttachment(url, options);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=attachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment.js","sourceRoot":"","sources":["../../src/commands/attachment.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,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M;IACV,CAAC;IAED,sDAAsD;IACtD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,QAAQ,KAAK,QAAQ,KAAK,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC5F,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAC1C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACxB,CAAC;SAAM,CAAC;QACJ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACjC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAgB;IACtD,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAA;IAEvF,UAAU;SACL,OAAO,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;SAC1C,WAAW,CAAC,wCAAwC,CAAC;SACrD,MAAM,CAAC,QAAQ,EAAE,0CAA0C,CAAC;SAC5D,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;QACrB,IAAI,CAAC,GAAG,EAAE,CAAC;YACP,aAAa,CAAC,UAAU,CAAC,CAAA;YACzB,OAAM;QACV,CAAC;QACD,OAAO,cAAc,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;AACV,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TokenStorageResult } from '../../lib/auth.js';
|
|
2
|
+
export declare function promptHiddenInput(prompt: string): Promise<string>;
|
|
3
|
+
/**
|
|
4
|
+
* Surface a `TokenStorageResult` from a save/clear operation: the
|
|
5
|
+
* human-readable confirmation goes to stdout, any keyring-fallback warning
|
|
6
|
+
* goes to stderr. Pass `isMachineOutput: true` when the command is in
|
|
7
|
+
* `--json` / `--ndjson` mode so the stdout confirmation is suppressed and
|
|
8
|
+
* the warning still reaches the operator on stderr.
|
|
9
|
+
*/
|
|
10
|
+
export declare function logTokenStorageResult(result: TokenStorageResult, secureStoreMessage: string, isMachineOutput?: boolean): void;
|
|
11
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAE3D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAoBjE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,kBAAkB,EAC1B,kBAAkB,EAAE,MAAM,EAC1B,eAAe,UAAQ,GACxB,IAAI,CAQN"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createInterface } from 'node:readline';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
export function promptHiddenInput(prompt) {
|
|
4
|
+
return new Promise((resolve) => {
|
|
5
|
+
const rl = createInterface({
|
|
6
|
+
input: process.stdin,
|
|
7
|
+
output: process.stdout,
|
|
8
|
+
});
|
|
9
|
+
// biome-ignore lint/suspicious/noExplicitAny: accessing private readline property
|
|
10
|
+
const origWrite = rl._writeToOutput;
|
|
11
|
+
rl._writeToOutput = (str) => {
|
|
12
|
+
if (str.includes(prompt)) {
|
|
13
|
+
origWrite.call(rl, prompt);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
rl.question(prompt, (answer) => {
|
|
17
|
+
rl.close();
|
|
18
|
+
process.stdout.write('\n');
|
|
19
|
+
resolve(answer);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Surface a `TokenStorageResult` from a save/clear operation: the
|
|
25
|
+
* human-readable confirmation goes to stdout, any keyring-fallback warning
|
|
26
|
+
* goes to stderr. Pass `isMachineOutput: true` when the command is in
|
|
27
|
+
* `--json` / `--ndjson` mode so the stdout confirmation is suppressed and
|
|
28
|
+
* the warning still reaches the operator on stderr.
|
|
29
|
+
*/
|
|
30
|
+
export function logTokenStorageResult(result, secureStoreMessage, isMachineOutput = false) {
|
|
31
|
+
if (!isMachineOutput && result.storage === 'secure-store') {
|
|
32
|
+
console.log(chalk.dim(secureStoreMessage));
|
|
33
|
+
}
|
|
34
|
+
if (result.warning) {
|
|
35
|
+
console.error(chalk.yellow('Warning:'), result.warning);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/commands/auth/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC5C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,MAAM,EAAE,GAAG,eAAe,CAAC;YACvB,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,MAAM,EAAE,OAAO,CAAC,MAAM;SACzB,CAAC,CAAA;QACF,kFAAkF;QAClF,MAAM,SAAS,GAAI,EAAU,CAAC,cAAc,CAE3C;QAAC,EAAU,CAAC,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE;YAC1C,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvB,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;YAC9B,CAAC;QACL,CAAC,CAAA;QACD,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;YAC3B,EAAE,CAAC,KAAK,EAAE,CAAA;YACV,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YAC1B,OAAO,CAAC,MAAM,CAAC,CAAA;QACnB,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACjC,MAA0B,EAC1B,kBAA0B,EAC1B,eAAe,GAAG,KAAK;IAEvB,IAAI,CAAC,eAAe,IAAI,MAAM,CAAC,OAAO,KAAK,cAAc,EAAE,CAAC;QACxD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAA;IAC9C,CAAC;IAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;IAC3D,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAYxC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyC1D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { attachTokenViewCommand } from '@todoist/cli-core/auth';
|
|
2
|
+
import { createTodoistTokenStore, parseCredentialStore, TOKEN_ENV_VAR, } from '../../lib/auth-store.js';
|
|
3
|
+
import { attachTodoistLoginCommand } from './login.js';
|
|
4
|
+
import { attachTodoistLogoutCommand } from './logout.js';
|
|
5
|
+
import { attachTodoistStatusCommand } from './status.js';
|
|
6
|
+
import { withUserRefAware } from './store-wrap.js';
|
|
7
|
+
import { loginWithToken } from './token.js';
|
|
8
|
+
export function registerAuthCommand(program) {
|
|
9
|
+
const auth = program.command('auth').description('Manage authentication');
|
|
10
|
+
// `store` is the raw cli-core `TokenStore` used by status, with an
|
|
11
|
+
// env-token short-circuit on authenticated reads. Login creates its own
|
|
12
|
+
// store so its --credential-store choice controls the write policy.
|
|
13
|
+
//
|
|
14
|
+
// - `refAware` substitutes `getRequestedUserRef()` for the `--user
|
|
15
|
+
// <ref>` that `index.ts` strips from argv before commander runs, and
|
|
16
|
+
// turns ref-misses into typed `UserNotFoundError`. Used by every
|
|
17
|
+
// cli-core registrar that needs the global `--user` flag (logout +
|
|
18
|
+
// token view).
|
|
19
|
+
const store = createTodoistTokenStore();
|
|
20
|
+
const refAware = withUserRefAware(store);
|
|
21
|
+
attachTodoistLoginCommand(auth);
|
|
22
|
+
attachTodoistLogoutCommand(auth, refAware);
|
|
23
|
+
attachTodoistStatusCommand(auth, store);
|
|
24
|
+
// `token` is a hybrid: positional `[token]` saves, and the `view`
|
|
25
|
+
// subcommand prints. Commander matches the subcommand name before the
|
|
26
|
+
// parent action, so `td auth token view` always dispatches to the view
|
|
27
|
+
// path — Todoist tokens are 40-char hex so the disambiguation is safe.
|
|
28
|
+
const tokenCmd = auth
|
|
29
|
+
.command('token [token]')
|
|
30
|
+
.description('Save API token for CLI authentication (or use a subcommand: `view`)')
|
|
31
|
+
.option('--credential-store <store>', 'Where to store the credential: system (default) or plaintext', parseCredentialStore, 'system')
|
|
32
|
+
.action(loginWithToken);
|
|
33
|
+
attachTokenViewCommand(tokenCmd, {
|
|
34
|
+
name: 'view',
|
|
35
|
+
store: refAware,
|
|
36
|
+
envVarName: TOKEN_ENV_VAR,
|
|
37
|
+
description: 'Print the stored API token for the active user (or --user <ref>) to stdout for use in scripts',
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,EACH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AC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
/**
|
|
3
|
+
* Attach `td auth login` via cli-core's generic `attachLoginCommand`. The
|
|
4
|
+
* registrar wires `--read-only`, `--callback-port`, `--json`, `--ndjson` and
|
|
5
|
+
* drives `runOAuthFlow`; the bits below stay todoist-local: scope resolution
|
|
6
|
+
* (comma-joined, custom validators), branded HTML, multi-user store via
|
|
7
|
+
* `createTodoistTokenStore`, and the human-mode success line.
|
|
8
|
+
*
|
|
9
|
+
* `--additional-scopes` is attached after the registrar so the option lands on
|
|
10
|
+
* the same Commander view; cli-core surfaces it through the `flags` argument
|
|
11
|
+
* to `resolveScopes`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function attachTodoistLoginCommand(auth: Command): Command;
|
|
14
|
+
//# sourceMappingURL=login.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/login.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAoBxC;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAuFhE"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { formatJson, formatNdjson } from '@todoist/cli-core';
|
|
2
|
+
import { attachLoginCommand } from '@todoist/cli-core/auth';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { renderAuthErrorPage, renderAuthSuccessPage } from '../../lib/auth-html.js';
|
|
5
|
+
import { createTodoistAuthProvider } from '../../lib/auth-provider.js';
|
|
6
|
+
import { createTodoistTokenStore, parseCredentialStore, } from '../../lib/auth-store.js';
|
|
7
|
+
import { openInBrowser } from '../../lib/browser.js';
|
|
8
|
+
import { extractAdditionalScopes, formatScopesHelp, resolveAuthScope, } from '../../lib/oauth-scopes.js';
|
|
9
|
+
import { logTokenStorageResult } from './helpers.js';
|
|
10
|
+
const TODOIST_CALLBACK_PORT = 8765;
|
|
11
|
+
const TODOIST_CALLBACK_PORT_FALLBACK = 5;
|
|
12
|
+
/**
|
|
13
|
+
* Attach `td auth login` via cli-core's generic `attachLoginCommand`. The
|
|
14
|
+
* registrar wires `--read-only`, `--callback-port`, `--json`, `--ndjson` and
|
|
15
|
+
* drives `runOAuthFlow`; the bits below stay todoist-local: scope resolution
|
|
16
|
+
* (comma-joined, custom validators), branded HTML, multi-user store via
|
|
17
|
+
* `createTodoistTokenStore`, and the human-mode success line.
|
|
18
|
+
*
|
|
19
|
+
* `--additional-scopes` is attached after the registrar so the option lands on
|
|
20
|
+
* the same Commander view; cli-core surfaces it through the `flags` argument
|
|
21
|
+
* to `resolveScopes`.
|
|
22
|
+
*/
|
|
23
|
+
export function attachTodoistLoginCommand(auth) {
|
|
24
|
+
// `--no-browser-open` lets the user finish the flow by copy-pasting the
|
|
25
|
+
// printed authorize URL (headless host, remote shell, or simply not wanting
|
|
26
|
+
// the browser hijacked). cli-core always surfaces the URL before the
|
|
27
|
+
// `openBrowser` hook fires, so skipping the spawn still leaves a usable
|
|
28
|
+
// login. The hook isn't handed the parsed flags, so we read the option off
|
|
29
|
+
// the command at call time via this forward reference (assigned below,
|
|
30
|
+
// before any login can run).
|
|
31
|
+
let loginCommand;
|
|
32
|
+
let credentialStore = 'system';
|
|
33
|
+
const store = createTodoistTokenStore({ credentialStore: () => credentialStore });
|
|
34
|
+
const login = attachLoginCommand(auth, {
|
|
35
|
+
provider: createTodoistAuthProvider(),
|
|
36
|
+
store,
|
|
37
|
+
preferredPort: TODOIST_CALLBACK_PORT,
|
|
38
|
+
portFallbackCount: TODOIST_CALLBACK_PORT_FALLBACK,
|
|
39
|
+
resolveScopes: ({ readOnly, flags }) => {
|
|
40
|
+
const additionalScopes = extractAdditionalScopes(flags);
|
|
41
|
+
// resolveAuthScope returns the comma-separated string Todoist expects;
|
|
42
|
+
// split into the array cli-core's PKCE provider re-joins (the provider
|
|
43
|
+
// is configured with `scopeSeparator: ','`).
|
|
44
|
+
return resolveAuthScope({ readOnly, additionalScopes }).split(',');
|
|
45
|
+
},
|
|
46
|
+
renderSuccess: renderAuthSuccessPage,
|
|
47
|
+
renderError: renderAuthErrorPage,
|
|
48
|
+
openBrowser: async (url) => {
|
|
49
|
+
if (loginCommand?.opts().browserOpen === false)
|
|
50
|
+
return;
|
|
51
|
+
// cli-core already prints the authorize URL before this hook fires,
|
|
52
|
+
// so suppress the helper's own announcement to avoid a duplicate.
|
|
53
|
+
await openInBrowser(url, { announce: false });
|
|
54
|
+
},
|
|
55
|
+
onSuccess: ({ account, view }) => {
|
|
56
|
+
const storage = store.getLastStorageResult();
|
|
57
|
+
if (view.json) {
|
|
58
|
+
console.log(formatJson({ displayName: 'Todoist', account }));
|
|
59
|
+
}
|
|
60
|
+
else if (view.ndjson) {
|
|
61
|
+
console.log(formatNdjson([{ displayName: 'Todoist', account }]));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
const label = account.label ?? account.id;
|
|
65
|
+
console.log(`${chalk.green('✓')} Signed in to Todoist as ${chalk.cyan(label)}`);
|
|
66
|
+
}
|
|
67
|
+
// Surface keyring-fallback warnings regardless of view mode so a
|
|
68
|
+
// silent plaintext-storage fallback never goes unreported.
|
|
69
|
+
// `logTokenStorageResult` writes warnings to stderr, keeping the
|
|
70
|
+
// `--json` / `--ndjson` stdout envelope clean; the human "stored
|
|
71
|
+
// securely" confirmation is suppressed in machine-output mode.
|
|
72
|
+
if (storage) {
|
|
73
|
+
logTokenStorageResult(storage, 'Token stored securely in the system credential manager', view.json || view.ndjson);
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
loginCommand = login;
|
|
78
|
+
return login
|
|
79
|
+
.description('Authenticate with Todoist via OAuth')
|
|
80
|
+
.option('--no-browser-open', 'Print the authorization URL instead of opening it in a browser automatically')
|
|
81
|
+
.option('--additional-scopes <list>', 'Comma-separated opt-in OAuth scopes (see list below). The flag may be repeated; every occurrence is merged.',
|
|
82
|
+
// Commander treats this as a scalar by default, so repeated uses
|
|
83
|
+
// (`--additional-scopes=a --additional-scopes=b`) would silently drop
|
|
84
|
+
// earlier values. Concatenate into one comma-separated string and let
|
|
85
|
+
// parseScopesOption split/dedupe/validate as usual.
|
|
86
|
+
(value, prev) => prev && prev.length > 0 ? `${prev},${value}` : value)
|
|
87
|
+
.option('--credential-store <store>', 'Where to store the credential: system (default) or plaintext', (value) => {
|
|
88
|
+
credentialStore = parseCredentialStore(value);
|
|
89
|
+
return credentialStore;
|
|
90
|
+
}, 'system')
|
|
91
|
+
.addHelpText('after', formatScopesHelp());
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=login.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/commands/auth/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACH,uBAAuB,EACvB,oBAAoB,GAGvB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EACH,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,GACnB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,MAAM,qBAAqB,GAAG,IAAI,CAAA;AAClC,MAAM,8BAA8B,GAAG,CAAC,CAAA;AAExC;;;;;;;;;;GAUG;AACH,MAAM,UAA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CAAA;QAC7C,OAAO,eAAe,CAAA;IAC1B,CAAC,EACD,QAAQ,CACX;SACA,WAAW,CAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC,CAAA;AACjD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { TodoistTokenStore } from '../../lib/auth-store.js';
|
|
3
|
+
/**
|
|
4
|
+
* `td auth logout`. cli-core owns the success line + `--json` / `--ndjson`
|
|
5
|
+
* envelopes; the Todoist hook surfaces the keyring-fallback warning that
|
|
6
|
+
* cli-core's `TokenStore.clear: void` contract can't carry. The `--user
|
|
7
|
+
* <ref>` injection lives on the wrapped store the caller passes in (see
|
|
8
|
+
* `withUserRefAware` in `store-wrap.ts`).
|
|
9
|
+
*/
|
|
10
|
+
export declare function attachTodoistLogoutCommand(auth: Command, store: TodoistTokenStore): Command;
|
|
11
|
+
//# sourceMappingURL=logout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/logout.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,KAAK,EAAkB,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAGhF;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAa3F"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { attachLogoutCommand } from '@todoist/cli-core/auth';
|
|
2
|
+
import { logTokenStorageResult } from './helpers.js';
|
|
3
|
+
/**
|
|
4
|
+
* `td auth logout`. cli-core owns the success line + `--json` / `--ndjson`
|
|
5
|
+
* envelopes; the Todoist hook surfaces the keyring-fallback warning that
|
|
6
|
+
* cli-core's `TokenStore.clear: void` contract can't carry. The `--user
|
|
7
|
+
* <ref>` injection lives on the wrapped store the caller passes in (see
|
|
8
|
+
* `withUserRefAware` in `store-wrap.ts`).
|
|
9
|
+
*/
|
|
10
|
+
export function attachTodoistLogoutCommand(auth, store) {
|
|
11
|
+
return attachLogoutCommand(auth, {
|
|
12
|
+
store,
|
|
13
|
+
onCleared: ({ view }) => {
|
|
14
|
+
const result = store.getLastClearResult();
|
|
15
|
+
if (!result)
|
|
16
|
+
return;
|
|
17
|
+
logTokenStorageResult(result, 'Stored token removed from the system credential manager', view.json || view.ndjson);
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=logout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logout.js","sourceRoot":"","sources":["../../../src/commands/auth/logout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAG5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CAAC,IAAa,EAAE,KAAwB;IAC9E,OAAO,mBAAmB,CAAiB,IAAI,EAAE;QAC7C,KAAK;QACL,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;YACpB,MAAM,MAAM,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAA;YACzC,IAAI,CAAC,MAAM;gBAAE,OAAM;YACnB,qBAAqB,CACjB,MAAM,EACN,yDAAyD,EACzD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,CAC3B,CAAA;QACL,CAAC;KACJ,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { type TodoistTokenStore } from '../../lib/auth-store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Attach `td auth status` via cli-core's generic `attachStatusCommand`.
|
|
5
|
+
*
|
|
6
|
+
* `TodoistTokenStore.active()` returns `null` for env-token mode + when no
|
|
7
|
+
* default user is stored (per the adapter's documented contract — see
|
|
8
|
+
* `auth-store.ts`). To preserve the existing UX for those cases we route the
|
|
9
|
+
* full status fetch through `onNotAuthenticated`; when `active()` does return
|
|
10
|
+
* a snapshot, `fetchLive` covers the same gather so renderText/renderJson can
|
|
11
|
+
* read from a single closure-captured `StatusData` regardless of which path
|
|
12
|
+
* we took. The snapshot path also short-circuits one credential resolve via
|
|
13
|
+
* `gatherStatusData(token)` when no `--user <ref>` is in play; when `--user`
|
|
14
|
+
* is set we re-resolve through `getApi()` so the displayed account matches
|
|
15
|
+
* the selector instead of the snapshot's default.
|
|
16
|
+
*/
|
|
17
|
+
export declare function attachTodoistStatusCommand(auth: Command, store: TodoistTokenStore): Command;
|
|
18
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/status.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAGH,KAAK,iBAAiB,EAEzB,MAAM,yBAAyB,CAAA;AAuGhC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAkD3F"}
|