@ttctl/cli 0.0.0 → 0.1.0-rc.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/README.md +44 -9
- package/dist/commands/applications/index.d.ts +21 -0
- package/dist/commands/applications/index.d.ts.map +1 -0
- package/dist/commands/applications/index.js +87 -0
- package/dist/commands/applications/index.js.map +1 -0
- package/dist/commands/applications/list.d.ts +55 -0
- package/dist/commands/applications/list.d.ts.map +1 -0
- package/dist/commands/applications/list.js +106 -0
- package/dist/commands/applications/list.js.map +1 -0
- package/dist/commands/applications/shared.d.ts +14 -0
- package/dist/commands/applications/shared.d.ts.map +1 -0
- package/dist/commands/applications/shared.js +19 -0
- package/dist/commands/applications/shared.js.map +1 -0
- package/dist/commands/applications/show.d.ts +51 -0
- package/dist/commands/applications/show.d.ts.map +1 -0
- package/dist/commands/applications/show.js +154 -0
- package/dist/commands/applications/show.js.map +1 -0
- package/dist/commands/applications/stats.d.ts +42 -0
- package/dist/commands/applications/stats.d.ts.map +1 -0
- package/dist/commands/applications/stats.js +69 -0
- package/dist/commands/applications/stats.js.map +1 -0
- package/dist/commands/auth/index.d.ts +17 -0
- package/dist/commands/auth/index.d.ts.map +1 -0
- package/dist/commands/auth/index.js +69 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/auth/init.d.ts +98 -0
- package/dist/commands/auth/init.d.ts.map +1 -0
- package/dist/commands/auth/init.js +387 -0
- package/dist/commands/auth/init.js.map +1 -0
- package/dist/commands/auth/signin.d.ts +81 -0
- package/dist/commands/auth/signin.d.ts.map +1 -0
- package/dist/commands/auth/signin.js +145 -0
- package/dist/commands/auth/signin.js.map +1 -0
- package/dist/commands/auth/signout.d.ts +133 -0
- package/dist/commands/auth/signout.d.ts.map +1 -0
- package/dist/commands/auth/signout.js +172 -0
- package/dist/commands/auth/signout.js.map +1 -0
- package/dist/commands/auth/status.d.ts +62 -0
- package/dist/commands/auth/status.d.ts.map +1 -0
- package/dist/commands/auth/status.js +98 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/availability/allocated-hours.d.ts +27 -0
- package/dist/commands/availability/allocated-hours.d.ts.map +1 -0
- package/dist/commands/availability/allocated-hours.js +61 -0
- package/dist/commands/availability/allocated-hours.js.map +1 -0
- package/dist/commands/availability/index.d.ts +30 -0
- package/dist/commands/availability/index.d.ts.map +1 -0
- package/dist/commands/availability/index.js +124 -0
- package/dist/commands/availability/index.js.map +1 -0
- package/dist/commands/availability/shared.d.ts +11 -0
- package/dist/commands/availability/shared.d.ts.map +1 -0
- package/dist/commands/availability/shared.js +30 -0
- package/dist/commands/availability/shared.js.map +1 -0
- package/dist/commands/availability/show.d.ts +32 -0
- package/dist/commands/availability/show.d.ts.map +1 -0
- package/dist/commands/availability/show.js +86 -0
- package/dist/commands/availability/show.js.map +1 -0
- package/dist/commands/availability/working-hours.d.ts +53 -0
- package/dist/commands/availability/working-hours.d.ts.map +1 -0
- package/dist/commands/availability/working-hours.js +151 -0
- package/dist/commands/availability/working-hours.js.map +1 -0
- package/dist/commands/contracts/index.d.ts +69 -0
- package/dist/commands/contracts/index.d.ts.map +1 -0
- package/dist/commands/contracts/index.js +198 -0
- package/dist/commands/contracts/index.js.map +1 -0
- package/dist/commands/engagements/breaks.d.ts +81 -0
- package/dist/commands/engagements/breaks.d.ts.map +1 -0
- package/dist/commands/engagements/breaks.js +229 -0
- package/dist/commands/engagements/breaks.js.map +1 -0
- package/dist/commands/engagements/index.d.ts +29 -0
- package/dist/commands/engagements/index.d.ts.map +1 -0
- package/dist/commands/engagements/index.js +172 -0
- package/dist/commands/engagements/index.js.map +1 -0
- package/dist/commands/engagements/list.d.ts +49 -0
- package/dist/commands/engagements/list.d.ts.map +1 -0
- package/dist/commands/engagements/list.js +95 -0
- package/dist/commands/engagements/list.js.map +1 -0
- package/dist/commands/engagements/shared.d.ts +10 -0
- package/dist/commands/engagements/shared.d.ts.map +1 -0
- package/dist/commands/engagements/shared.js +31 -0
- package/dist/commands/engagements/shared.js.map +1 -0
- package/dist/commands/engagements/show.d.ts +19 -0
- package/dist/commands/engagements/show.d.ts.map +1 -0
- package/dist/commands/engagements/show.js +150 -0
- package/dist/commands/engagements/show.js.map +1 -0
- package/dist/commands/engagements/stats.d.ts +24 -0
- package/dist/commands/engagements/stats.d.ts.map +1 -0
- package/dist/commands/engagements/stats.js +51 -0
- package/dist/commands/engagements/stats.js.map +1 -0
- package/dist/commands/jobs/index.d.ts +49 -0
- package/dist/commands/jobs/index.d.ts.map +1 -0
- package/dist/commands/jobs/index.js +304 -0
- package/dist/commands/jobs/index.js.map +1 -0
- package/dist/commands/jobs/interest.d.ts +65 -0
- package/dist/commands/jobs/interest.d.ts.map +1 -0
- package/dist/commands/jobs/interest.js +172 -0
- package/dist/commands/jobs/interest.js.map +1 -0
- package/dist/commands/jobs/list.d.ts +81 -0
- package/dist/commands/jobs/list.d.ts.map +1 -0
- package/dist/commands/jobs/list.js +157 -0
- package/dist/commands/jobs/list.js.map +1 -0
- package/dist/commands/jobs/search.d.ts +71 -0
- package/dist/commands/jobs/search.d.ts.map +1 -0
- package/dist/commands/jobs/search.js +163 -0
- package/dist/commands/jobs/search.js.map +1 -0
- package/dist/commands/jobs/shared.d.ts +79 -0
- package/dist/commands/jobs/shared.d.ts.map +1 -0
- package/dist/commands/jobs/shared.js +133 -0
- package/dist/commands/jobs/shared.js.map +1 -0
- package/dist/commands/jobs/show.d.ts +20 -0
- package/dist/commands/jobs/show.d.ts.map +1 -0
- package/dist/commands/jobs/show.js +135 -0
- package/dist/commands/jobs/show.js.map +1 -0
- package/dist/commands/payments/index.d.ts +34 -0
- package/dist/commands/payments/index.d.ts.map +1 -0
- package/dist/commands/payments/index.js +160 -0
- package/dist/commands/payments/index.js.map +1 -0
- package/dist/commands/payments/methods.d.ts +17 -0
- package/dist/commands/payments/methods.d.ts.map +1 -0
- package/dist/commands/payments/methods.js +79 -0
- package/dist/commands/payments/methods.js.map +1 -0
- package/dist/commands/payments/payouts.d.ts +44 -0
- package/dist/commands/payments/payouts.d.ts.map +1 -0
- package/dist/commands/payments/payouts.js +147 -0
- package/dist/commands/payments/payouts.js.map +1 -0
- package/dist/commands/payments/rate.d.ts +48 -0
- package/dist/commands/payments/rate.d.ts.map +1 -0
- package/dist/commands/payments/rate.js +229 -0
- package/dist/commands/payments/rate.js.map +1 -0
- package/dist/commands/payments/shared.d.ts +10 -0
- package/dist/commands/payments/shared.d.ts.map +1 -0
- package/dist/commands/payments/shared.js +27 -0
- package/dist/commands/payments/shared.js.map +1 -0
- package/dist/commands/profile/basic/index.d.ts +18 -0
- package/dist/commands/profile/basic/index.d.ts.map +1 -0
- package/dist/commands/profile/basic/index.js +79 -0
- package/dist/commands/profile/basic/index.js.map +1 -0
- package/dist/commands/profile/basic/photo-show.d.ts +28 -0
- package/dist/commands/profile/basic/photo-show.d.ts.map +1 -0
- package/dist/commands/profile/basic/photo-show.js +112 -0
- package/dist/commands/profile/basic/photo-show.js.map +1 -0
- package/dist/commands/profile/basic/photo-upload.d.ts +10 -0
- package/dist/commands/profile/basic/photo-upload.d.ts.map +1 -0
- package/dist/commands/profile/basic/photo-upload.js +61 -0
- package/dist/commands/profile/basic/photo-upload.js.map +1 -0
- package/dist/commands/profile/basic/set.d.ts +54 -0
- package/dist/commands/profile/basic/set.d.ts.map +1 -0
- package/dist/commands/profile/basic/set.js +174 -0
- package/dist/commands/profile/basic/set.js.map +1 -0
- package/dist/commands/profile/basic/show.d.ts +95 -0
- package/dist/commands/profile/basic/show.d.ts.map +1 -0
- package/dist/commands/profile/basic/show.js +310 -0
- package/dist/commands/profile/basic/show.js.map +1 -0
- package/dist/commands/profile/certifications/index.d.ts +31 -0
- package/dist/commands/profile/certifications/index.d.ts.map +1 -0
- package/dist/commands/profile/certifications/index.js +298 -0
- package/dist/commands/profile/certifications/index.js.map +1 -0
- package/dist/commands/profile/education/index.d.ts +28 -0
- package/dist/commands/profile/education/index.d.ts.map +1 -0
- package/dist/commands/profile/education/index.js +287 -0
- package/dist/commands/profile/education/index.js.map +1 -0
- package/dist/commands/profile/employment/index.d.ts +40 -0
- package/dist/commands/profile/employment/index.d.ts.map +1 -0
- package/dist/commands/profile/employment/index.js +364 -0
- package/dist/commands/profile/employment/index.js.map +1 -0
- package/dist/commands/profile/external/_shared.d.ts +35 -0
- package/dist/commands/profile/external/_shared.d.ts.map +1 -0
- package/dist/commands/profile/external/_shared.js +59 -0
- package/dist/commands/profile/external/_shared.js.map +1 -0
- package/dist/commands/profile/external/advanced-wizard-show.d.ts +15 -0
- package/dist/commands/profile/external/advanced-wizard-show.d.ts.map +1 -0
- package/dist/commands/profile/external/advanced-wizard-show.js +82 -0
- package/dist/commands/profile/external/advanced-wizard-show.js.map +1 -0
- package/dist/commands/profile/external/custom-requirements-set.d.ts +32 -0
- package/dist/commands/profile/external/custom-requirements-set.d.ts.map +1 -0
- package/dist/commands/profile/external/custom-requirements-set.js +116 -0
- package/dist/commands/profile/external/custom-requirements-set.js.map +1 -0
- package/dist/commands/profile/external/custom-requirements-show.d.ts +16 -0
- package/dist/commands/profile/external/custom-requirements-show.d.ts.map +1 -0
- package/dist/commands/profile/external/custom-requirements-show.js +84 -0
- package/dist/commands/profile/external/custom-requirements-show.js.map +1 -0
- package/dist/commands/profile/external/index.d.ts +20 -0
- package/dist/commands/profile/external/index.d.ts.map +1 -0
- package/dist/commands/profile/external/index.js +102 -0
- package/dist/commands/profile/external/index.js.map +1 -0
- package/dist/commands/profile/external/readiness.d.ts +15 -0
- package/dist/commands/profile/external/readiness.d.ts.map +1 -0
- package/dist/commands/profile/external/readiness.js +104 -0
- package/dist/commands/profile/external/readiness.js.map +1 -0
- package/dist/commands/profile/external/recommendations.d.ts +17 -0
- package/dist/commands/profile/external/recommendations.d.ts.map +1 -0
- package/dist/commands/profile/external/recommendations.js +97 -0
- package/dist/commands/profile/external/recommendations.js.map +1 -0
- package/dist/commands/profile/external/update.d.ts +32 -0
- package/dist/commands/profile/external/update.d.ts.map +1 -0
- package/dist/commands/profile/external/update.js +118 -0
- package/dist/commands/profile/external/update.js.map +1 -0
- package/dist/commands/profile/index.d.ts +16 -0
- package/dist/commands/profile/index.d.ts.map +1 -0
- package/dist/commands/profile/index.js +81 -0
- package/dist/commands/profile/index.js.map +1 -0
- package/dist/commands/profile/industries/index.d.ts +36 -0
- package/dist/commands/profile/industries/index.d.ts.map +1 -0
- package/dist/commands/profile/industries/index.js +230 -0
- package/dist/commands/profile/industries/index.js.map +1 -0
- package/dist/commands/profile/portfolio/add.d.ts +43 -0
- package/dist/commands/profile/portfolio/add.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/add.js +181 -0
- package/dist/commands/profile/portfolio/add.js.map +1 -0
- package/dist/commands/profile/portfolio/highlight.d.ts +11 -0
- package/dist/commands/profile/portfolio/highlight.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/highlight.js +31 -0
- package/dist/commands/profile/portfolio/highlight.js.map +1 -0
- package/dist/commands/profile/portfolio/index.d.ts +16 -0
- package/dist/commands/profile/portfolio/index.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/index.js +121 -0
- package/dist/commands/profile/portfolio/index.js.map +1 -0
- package/dist/commands/profile/portfolio/list.d.ts +83 -0
- package/dist/commands/profile/portfolio/list.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/list.js +189 -0
- package/dist/commands/profile/portfolio/list.js.map +1 -0
- package/dist/commands/profile/portfolio/remove.d.ts +9 -0
- package/dist/commands/profile/portfolio/remove.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/remove.js +24 -0
- package/dist/commands/profile/portfolio/remove.js.map +1 -0
- package/dist/commands/profile/portfolio/reorder.d.ts +17 -0
- package/dist/commands/profile/portfolio/reorder.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/reorder.js +135 -0
- package/dist/commands/profile/portfolio/reorder.js.map +1 -0
- package/dist/commands/profile/portfolio/shared.d.ts +8 -0
- package/dist/commands/profile/portfolio/shared.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/shared.js +10 -0
- package/dist/commands/profile/portfolio/shared.js.map +1 -0
- package/dist/commands/profile/portfolio/update.d.ts +18 -0
- package/dist/commands/profile/portfolio/update.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/update.js +77 -0
- package/dist/commands/profile/portfolio/update.js.map +1 -0
- package/dist/commands/profile/portfolio/upload.d.ts +8 -0
- package/dist/commands/profile/portfolio/upload.d.ts.map +1 -0
- package/dist/commands/profile/portfolio/upload.js +131 -0
- package/dist/commands/profile/portfolio/upload.js.map +1 -0
- package/dist/commands/profile/resume/cancel-upload.d.ts +9 -0
- package/dist/commands/profile/resume/cancel-upload.d.ts.map +1 -0
- package/dist/commands/profile/resume/cancel-upload.js +30 -0
- package/dist/commands/profile/resume/cancel-upload.js.map +1 -0
- package/dist/commands/profile/resume/index.d.ts +15 -0
- package/dist/commands/profile/resume/index.d.ts.map +1 -0
- package/dist/commands/profile/resume/index.js +42 -0
- package/dist/commands/profile/resume/index.js.map +1 -0
- package/dist/commands/profile/resume/upload.d.ts +16 -0
- package/dist/commands/profile/resume/upload.d.ts.map +1 -0
- package/dist/commands/profile/resume/upload.js +65 -0
- package/dist/commands/profile/resume/upload.js.map +1 -0
- package/dist/commands/profile/reviews/_shared.d.ts +9 -0
- package/dist/commands/profile/reviews/_shared.d.ts.map +1 -0
- package/dist/commands/profile/reviews/_shared.js +15 -0
- package/dist/commands/profile/reviews/_shared.js.map +1 -0
- package/dist/commands/profile/reviews/approve-item.d.ts +30 -0
- package/dist/commands/profile/reviews/approve-item.d.ts.map +1 -0
- package/dist/commands/profile/reviews/approve-item.js +82 -0
- package/dist/commands/profile/reviews/approve-item.js.map +1 -0
- package/dist/commands/profile/reviews/approve-section.d.ts +15 -0
- package/dist/commands/profile/reviews/approve-section.d.ts.map +1 -0
- package/dist/commands/profile/reviews/approve-section.js +67 -0
- package/dist/commands/profile/reviews/approve-section.js.map +1 -0
- package/dist/commands/profile/reviews/index.d.ts +19 -0
- package/dist/commands/profile/reviews/index.d.ts.map +1 -0
- package/dist/commands/profile/reviews/index.js +71 -0
- package/dist/commands/profile/reviews/index.js.map +1 -0
- package/dist/commands/profile/reviews/list.d.ts +17 -0
- package/dist/commands/profile/reviews/list.d.ts.map +1 -0
- package/dist/commands/profile/reviews/list.js +96 -0
- package/dist/commands/profile/reviews/list.js.map +1 -0
- package/dist/commands/profile/reviews/submit-for-review.d.ts +16 -0
- package/dist/commands/profile/reviews/submit-for-review.d.ts.map +1 -0
- package/dist/commands/profile/reviews/submit-for-review.js +65 -0
- package/dist/commands/profile/reviews/submit-for-review.js.map +1 -0
- package/dist/commands/profile/shared.d.ts +46 -0
- package/dist/commands/profile/shared.d.ts.map +1 -0
- package/dist/commands/profile/shared.js +111 -0
- package/dist/commands/profile/shared.js.map +1 -0
- package/dist/commands/profile/skills/index.d.ts +29 -0
- package/dist/commands/profile/skills/index.d.ts.map +1 -0
- package/dist/commands/profile/skills/index.js +475 -0
- package/dist/commands/profile/skills/index.js.map +1 -0
- package/dist/commands/profile/visas/add.d.ts +19 -0
- package/dist/commands/profile/visas/add.d.ts.map +1 -0
- package/dist/commands/profile/visas/add.js +37 -0
- package/dist/commands/profile/visas/add.js.map +1 -0
- package/dist/commands/profile/visas/index.d.ts +13 -0
- package/dist/commands/profile/visas/index.d.ts.map +1 -0
- package/dist/commands/profile/visas/index.js +69 -0
- package/dist/commands/profile/visas/index.js.map +1 -0
- package/dist/commands/profile/visas/list.d.ts +40 -0
- package/dist/commands/profile/visas/list.d.ts.map +1 -0
- package/dist/commands/profile/visas/list.js +115 -0
- package/dist/commands/profile/visas/list.js.map +1 -0
- package/dist/commands/profile/visas/remove.d.ts +8 -0
- package/dist/commands/profile/visas/remove.d.ts.map +1 -0
- package/dist/commands/profile/visas/remove.js +23 -0
- package/dist/commands/profile/visas/remove.js.map +1 -0
- package/dist/commands/profile/visas/shared.d.ts +11 -0
- package/dist/commands/profile/visas/shared.d.ts.map +1 -0
- package/dist/commands/profile/visas/shared.js +16 -0
- package/dist/commands/profile/visas/shared.js.map +1 -0
- package/dist/commands/profile/visas/update.d.ts +13 -0
- package/dist/commands/profile/visas/update.d.ts.map +1 -0
- package/dist/commands/profile/visas/update.js +44 -0
- package/dist/commands/profile/visas/update.js.map +1 -0
- package/dist/commands/timesheet/index.d.ts +24 -0
- package/dist/commands/timesheet/index.d.ts.map +1 -0
- package/dist/commands/timesheet/index.js +98 -0
- package/dist/commands/timesheet/index.js.map +1 -0
- package/dist/commands/timesheet/list.d.ts +40 -0
- package/dist/commands/timesheet/list.d.ts.map +1 -0
- package/dist/commands/timesheet/list.js +79 -0
- package/dist/commands/timesheet/list.js.map +1 -0
- package/dist/commands/timesheet/shared.d.ts +10 -0
- package/dist/commands/timesheet/shared.d.ts.map +1 -0
- package/dist/commands/timesheet/shared.js +35 -0
- package/dist/commands/timesheet/shared.js.map +1 -0
- package/dist/commands/timesheet/show.d.ts +19 -0
- package/dist/commands/timesheet/show.d.ts.map +1 -0
- package/dist/commands/timesheet/show.js +109 -0
- package/dist/commands/timesheet/show.js.map +1 -0
- package/dist/commands/timesheet/submit.d.ts +50 -0
- package/dist/commands/timesheet/submit.d.ts.map +1 -0
- package/dist/commands/timesheet/submit.js +151 -0
- package/dist/commands/timesheet/submit.js.map +1 -0
- package/dist/crash-handlers.d.ts +67 -0
- package/dist/crash-handlers.d.ts.map +1 -0
- package/dist/crash-handlers.js +78 -0
- package/dist/crash-handlers.js.map +1 -0
- package/dist/errors.d.ts +45 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +57 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/config-context.d.ts +41 -0
- package/dist/lib/config-context.d.ts.map +1 -0
- package/dist/lib/config-context.js +74 -0
- package/dist/lib/config-context.js.map +1 -0
- package/dist/lib/dry-run.d.ts +70 -0
- package/dist/lib/dry-run.d.ts.map +1 -0
- package/dist/lib/dry-run.js +114 -0
- package/dist/lib/dry-run.js.map +1 -0
- package/dist/lib/empty-state-cta.d.ts +63 -0
- package/dist/lib/empty-state-cta.d.ts.map +1 -0
- package/dist/lib/empty-state-cta.js +88 -0
- package/dist/lib/empty-state-cta.js.map +1 -0
- package/dist/lib/envelopes.d.ts +540 -0
- package/dist/lib/envelopes.d.ts.map +1 -0
- package/dist/lib/envelopes.js +598 -0
- package/dist/lib/envelopes.js.map +1 -0
- package/dist/lib/error-routing.d.ts +49 -0
- package/dist/lib/error-routing.d.ts.map +1 -0
- package/dist/lib/error-routing.js +72 -0
- package/dist/lib/error-routing.js.map +1 -0
- package/dist/lib/format-helpers.d.ts +65 -0
- package/dist/lib/format-helpers.d.ts.map +1 -0
- package/dist/lib/format-helpers.js +79 -0
- package/dist/lib/format-helpers.js.map +1 -0
- package/dist/lib/format-overrides.d.ts +81 -0
- package/dist/lib/format-overrides.d.ts.map +1 -0
- package/dist/lib/format-overrides.js +55 -0
- package/dist/lib/format-overrides.js.map +1 -0
- package/dist/lib/freetext.d.ts +83 -0
- package/dist/lib/freetext.d.ts.map +1 -0
- package/dist/lib/freetext.js +182 -0
- package/dist/lib/freetext.js.map +1 -0
- package/dist/lib/kill-switch-hook.d.ts +49 -0
- package/dist/lib/kill-switch-hook.d.ts.map +1 -0
- package/dist/lib/kill-switch-hook.js +34 -0
- package/dist/lib/kill-switch-hook.js.map +1 -0
- package/dist/lib/output.d.ts +173 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +177 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/pagination.d.ts +49 -0
- package/dist/lib/pagination.d.ts.map +1 -0
- package/dist/lib/pagination.js +36 -0
- package/dist/lib/pagination.js.map +1 -0
- package/dist/program.d.ts +80 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +273 -0
- package/dist/program.js.map +1 -0
- package/package.json +35 -13
- package/index.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|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GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAA+C;IAChF,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,cAAc,CAAC;IAC7C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { profile } from "@ttctl/core";
|
|
2
|
+
import type { OutputFormat } from "../../../lib/output.js";
|
|
3
|
+
/**
|
|
4
|
+
* Action handler for `ttctl profile portfolio add`. Creates a new
|
|
5
|
+
* portfolio item; if `--cover` is supplied, the cover image is uploaded
|
|
6
|
+
* first and its server-issued `coverImageCacheName` is forwarded into
|
|
7
|
+
* the create call so the new item carries the cover from creation.
|
|
8
|
+
*/
|
|
9
|
+
export declare function runProfilePortfolioAdd(options: {
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
edit?: boolean;
|
|
13
|
+
url?: string;
|
|
14
|
+
link?: string;
|
|
15
|
+
cover?: string;
|
|
16
|
+
industryId?: string[];
|
|
17
|
+
output: OutputFormat;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Route service errors through the envelope ABI (#128). `TtctlError`
|
|
21
|
+
* subclasses keep their dedicated 3-block pretty rendering on `pretty`;
|
|
22
|
+
* `json`/`yaml` flow through the envelope so machine consumers see the
|
|
23
|
+
* stable wire shape. Domain `PortfolioError` codes always flow through
|
|
24
|
+
* the envelope.
|
|
25
|
+
*/
|
|
26
|
+
declare function handlePortfolioError(commandLabel: string, err: unknown, format?: OutputFormat): never;
|
|
27
|
+
/**
|
|
28
|
+
* Emit the post-mutation portfolio list, wrapped in the v0.4 envelope
|
|
29
|
+
* ABI (#128). The portfolio core API returns the FULL post-mutation
|
|
30
|
+
* list rather than the single mutated entity, so the envelope's
|
|
31
|
+
* `created` / `updated` field carries the list (`PortfolioItem[]`)
|
|
32
|
+
* rather than a single `PortfolioItem`. The pretty rendering keeps the
|
|
33
|
+
* existing "success header + table" UX so users continue to see the
|
|
34
|
+
* post-state at a glance.
|
|
35
|
+
*/
|
|
36
|
+
export declare function emitMutationResult(items: profile.portfolio.PortfolioItem[], format: OutputFormat, verb: "add" | "update" | "remove", options: {
|
|
37
|
+
id?: string;
|
|
38
|
+
prettyHeader: string;
|
|
39
|
+
}): void;
|
|
40
|
+
/** Backward-compatible alias; new call sites use `emitMutationResult`. */
|
|
41
|
+
export declare function emitListResult(items: profile.portfolio.PortfolioItem[], format: OutputFormat, successMessage: string): void;
|
|
42
|
+
export { handlePortfolioError };
|
|
43
|
+
//# sourceMappingURL=add.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/add.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,OAAO,EAAE,MAAM,aAAa,CAAC;AAMlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAG3D;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,YAAY,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgFhB;AAED;;;;;;GAMG;AACH,iBAAS,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,YAAuB,GAAG,KAAK,CA0BxG;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,EACxC,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,EACjC,OAAO,EAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAC7C,IAAI,CAoCN;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,EACxC,MAAM,EAAE,YAAY,EACpB,cAAc,EAAE,MAAM,GACrB,IAAI,CAEN;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { TtctlError, profile } from "@ttctl/core";
|
|
4
|
+
import { presentTtctlError } from "../../../errors.js";
|
|
5
|
+
import { emitAddSuccess, emitErrorAndExit, emitRemoveSuccess, emitUpdateSuccess } from "../../../lib/envelopes.js";
|
|
6
|
+
import { FreeTextError, resolveFreeText } from "../../../lib/freetext.js";
|
|
7
|
+
import { loadAuthTokenOrExit } from "./shared.js";
|
|
8
|
+
/**
|
|
9
|
+
* Action handler for `ttctl profile portfolio add`. Creates a new
|
|
10
|
+
* portfolio item; if `--cover` is supplied, the cover image is uploaded
|
|
11
|
+
* first and its server-issued `coverImageCacheName` is forwarded into
|
|
12
|
+
* the create call so the new item carries the cover from creation.
|
|
13
|
+
*/
|
|
14
|
+
export async function runProfilePortfolioAdd(options) {
|
|
15
|
+
let description;
|
|
16
|
+
try {
|
|
17
|
+
description = await resolveFreeText(options.description, {
|
|
18
|
+
flagName: "description",
|
|
19
|
+
enableEditor: options.edit ?? false,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
if (err instanceof FreeTextError) {
|
|
24
|
+
emitErrorAndExit({
|
|
25
|
+
operation: "profile.portfolio.add",
|
|
26
|
+
format: options.output,
|
|
27
|
+
errors: [{ code: err.code, message: err.message }],
|
|
28
|
+
prettySummary: `portfolio add failed (${err.code}): ${err.message}`,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
throw err;
|
|
32
|
+
}
|
|
33
|
+
if (options.url !== undefined && options.link !== undefined && options.url !== options.link) {
|
|
34
|
+
emitErrorAndExit({
|
|
35
|
+
operation: "profile.portfolio.add",
|
|
36
|
+
format: options.output,
|
|
37
|
+
errors: [{ code: "VALIDATION_ERROR", message: "--url and --link cannot disagree." }],
|
|
38
|
+
prettySummary: "portfolio add failed (VALIDATION_ERROR): --url and --link cannot disagree.",
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (options.industryId === undefined || options.industryId.length === 0) {
|
|
42
|
+
emitErrorAndExit({
|
|
43
|
+
operation: "profile.portfolio.add",
|
|
44
|
+
format: options.output,
|
|
45
|
+
errors: [
|
|
46
|
+
{
|
|
47
|
+
code: "VALIDATION_ERROR",
|
|
48
|
+
message: "--industry-id is required (at least one). " +
|
|
49
|
+
'Discover catalog IDs via `ttctl profile industries autocomplete "<query>"`.',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
prettySummary: "portfolio add failed (VALIDATION_ERROR): --industry-id is required.",
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const link = options.link ?? options.url;
|
|
56
|
+
const token = await loadAuthTokenOrExit("portfolio add", options.output);
|
|
57
|
+
// Optional cover-image upload BEFORE create. The two calls are sequenced
|
|
58
|
+
// because `createPortfolioItem` needs the server-issued cache name to
|
|
59
|
+
// bind the cover to the new item; uploading is idempotent so a retry on
|
|
60
|
+
// a transient create failure is safe.
|
|
61
|
+
let coverImageCacheName = null;
|
|
62
|
+
if (options.cover !== undefined) {
|
|
63
|
+
try {
|
|
64
|
+
const result = await profile.portfolio.uploadCover(token, { kind: "path", path: options.cover });
|
|
65
|
+
coverImageCacheName = result.coverImageCacheName;
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
handlePortfolioError("portfolio add", err, options.output);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// `options.industryId` is verified non-empty above (emitErrorAndExit
|
|
73
|
+
// short-circuits) — narrow for TypeScript's benefit.
|
|
74
|
+
const industryIds = options.industryId;
|
|
75
|
+
const input = {
|
|
76
|
+
title: options.title,
|
|
77
|
+
industryIds,
|
|
78
|
+
};
|
|
79
|
+
if (description !== undefined)
|
|
80
|
+
input.description = description;
|
|
81
|
+
if (link !== undefined)
|
|
82
|
+
input.link = link;
|
|
83
|
+
if (coverImageCacheName !== null)
|
|
84
|
+
input.coverImage = coverImageCacheName;
|
|
85
|
+
let items;
|
|
86
|
+
try {
|
|
87
|
+
items = await profile.portfolio.add(token, input);
|
|
88
|
+
}
|
|
89
|
+
catch (err) {
|
|
90
|
+
handlePortfolioError("portfolio add", err, options.output);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
emitMutationResult(items, options.output, "add", { prettyHeader: "Portfolio item created." });
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Route service errors through the envelope ABI (#128). `TtctlError`
|
|
97
|
+
* subclasses keep their dedicated 3-block pretty rendering on `pretty`;
|
|
98
|
+
* `json`/`yaml` flow through the envelope so machine consumers see the
|
|
99
|
+
* stable wire shape. Domain `PortfolioError` codes always flow through
|
|
100
|
+
* the envelope.
|
|
101
|
+
*/
|
|
102
|
+
function handlePortfolioError(commandLabel, err, format = "pretty") {
|
|
103
|
+
if (err instanceof TtctlError) {
|
|
104
|
+
if (format === "pretty")
|
|
105
|
+
presentTtctlError(err);
|
|
106
|
+
const errors = [{ code: err.code, message: err.message, hint: err.recovery }];
|
|
107
|
+
emitErrorAndExit({
|
|
108
|
+
operation: commandLabel.replace(/ /g, "."),
|
|
109
|
+
format,
|
|
110
|
+
errors,
|
|
111
|
+
exitCode: err.code === "CF_403_CLEARANCE" || err.code === "CF_403_PERSISTENT" ? 2 : 1,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
if (err instanceof profile.portfolio.PortfolioError) {
|
|
115
|
+
emitErrorAndExit({
|
|
116
|
+
operation: commandLabel.replace(/ /g, "."),
|
|
117
|
+
format,
|
|
118
|
+
errors: [{ code: err.code, message: err.message }],
|
|
119
|
+
prettySummary: `${commandLabel} failed (${err.code}): ${err.message}`,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
123
|
+
emitErrorAndExit({
|
|
124
|
+
operation: commandLabel.replace(/ /g, "."),
|
|
125
|
+
format,
|
|
126
|
+
errors: [{ code: "INTERNAL_ERROR", message }],
|
|
127
|
+
prettySummary: `${commandLabel} failed: ${message}`,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Emit the post-mutation portfolio list, wrapped in the v0.4 envelope
|
|
132
|
+
* ABI (#128). The portfolio core API returns the FULL post-mutation
|
|
133
|
+
* list rather than the single mutated entity, so the envelope's
|
|
134
|
+
* `created` / `updated` field carries the list (`PortfolioItem[]`)
|
|
135
|
+
* rather than a single `PortfolioItem`. The pretty rendering keeps the
|
|
136
|
+
* existing "success header + table" UX so users continue to see the
|
|
137
|
+
* post-state at a glance.
|
|
138
|
+
*/
|
|
139
|
+
export function emitMutationResult(items, format, verb, options) {
|
|
140
|
+
const rows = items.map((it) => `${it.id}\t${it.title ?? ""}\t${it.highlight ? "★" : ""}\t${it.link ?? ""}`);
|
|
141
|
+
const tableText = ["id\ttitle\thighlight\tlink", ...rows].join("\n");
|
|
142
|
+
if (verb === "remove") {
|
|
143
|
+
const id = options.id;
|
|
144
|
+
if (id === undefined) {
|
|
145
|
+
throw new Error("emitMutationResult: `id` is required for the `remove` verb");
|
|
146
|
+
}
|
|
147
|
+
emitRemoveSuccess({
|
|
148
|
+
operation: "profile.portfolio.remove",
|
|
149
|
+
format,
|
|
150
|
+
id,
|
|
151
|
+
prettySummary: options.prettyHeader,
|
|
152
|
+
});
|
|
153
|
+
if (format === "pretty" && items.length > 0) {
|
|
154
|
+
process.stdout.write(`${tableText}\n`);
|
|
155
|
+
}
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
if (verb === "add") {
|
|
159
|
+
emitAddSuccess({
|
|
160
|
+
operation: "profile.portfolio.add",
|
|
161
|
+
format,
|
|
162
|
+
created: items,
|
|
163
|
+
prettySummary: options.prettyHeader,
|
|
164
|
+
prettyEntity: () => tableText,
|
|
165
|
+
});
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
emitUpdateSuccess({
|
|
169
|
+
operation: "profile.portfolio.update",
|
|
170
|
+
format,
|
|
171
|
+
updated: items,
|
|
172
|
+
prettySummary: options.prettyHeader,
|
|
173
|
+
prettyEntity: () => tableText,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
/** Backward-compatible alias; new call sites use `emitMutationResult`. */
|
|
177
|
+
export function emitListResult(items, format, successMessage) {
|
|
178
|
+
emitMutationResult(items, format, "update", { prettyHeader: successMessage });
|
|
179
|
+
}
|
|
180
|
+
export { handlePortfolioError };
|
|
181
|
+
//# sourceMappingURL=add.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/add.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,i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AAG,OAAO,CAAC,EAAE,CAAC;QACtB,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;QACD,iBAAiB,CAAC;YAChB,SAAS,EAAE,0BAA0B;YACrC,MAAM;YACN,EAAE;YACF,aAAa,EAAE,OAAO,CAAC,YAAY;SACpC,CAAC,CAAC;QACH,IAAI,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,SAAS,IAAI,CAAC,CAAC;QACzC,CAAC;QACD,OAAO;IACT,CAAC;IACD,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;QACnB,cAAc,CAAC;YACb,SAAS,EAAE,uBAAuB;YAClC,MAAM;YACN,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,OAAO,CAAC,YAAY;YACnC,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;SAC9B,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IACD,iBAAiB,CAAC;QAChB,SAAS,EAAE,0BAA0B;QACrC,MAAM;QACN,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,OAAO,CAAC,YAAY;QACnC,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;KAC9B,CAAC,CAAC;AACL,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,cAAc,CAC5B,KAAwC,EACxC,MAAoB,EACpB,cAAsB;IAEtB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC,CAAC;AAChF,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OutputFormat } from "../../../lib/output.js";
|
|
2
|
+
/**
|
|
3
|
+
* Action handler for `ttctl profile portfolio highlight <id>`. Sets the
|
|
4
|
+
* `highlight` flag on the named item. Pass `--off` to clear instead of
|
|
5
|
+
* set. Emits the v0.4 update envelope (#128).
|
|
6
|
+
*/
|
|
7
|
+
export declare function runProfilePortfolioHighlight(id: string, options: {
|
|
8
|
+
off?: boolean;
|
|
9
|
+
output: OutputFormat;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=highlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/highlight.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D;;;;GAIG;AACH,wBAAsB,4BAA4B,CAChD,EAAE,EAAE,MAAM,EACV,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAC/C,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { profile } from "@ttctl/core";
|
|
4
|
+
import { emitUpdateSuccess } from "../../../lib/envelopes.js";
|
|
5
|
+
import { handlePortfolioError } from "./add.js";
|
|
6
|
+
import { loadAuthTokenOrExit } from "./shared.js";
|
|
7
|
+
/**
|
|
8
|
+
* Action handler for `ttctl profile portfolio highlight <id>`. Sets the
|
|
9
|
+
* `highlight` flag on the named item. Pass `--off` to clear instead of
|
|
10
|
+
* set. Emits the v0.4 update envelope (#128).
|
|
11
|
+
*/
|
|
12
|
+
export async function runProfilePortfolioHighlight(id, options) {
|
|
13
|
+
const flag = !(options.off ?? false);
|
|
14
|
+
const token = await loadAuthTokenOrExit("portfolio highlight", options.output);
|
|
15
|
+
let result;
|
|
16
|
+
try {
|
|
17
|
+
result = await profile.portfolio.highlight(token, id, flag);
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
handlePortfolioError("portfolio highlight", err, options.output);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
emitUpdateSuccess({
|
|
24
|
+
operation: "profile.portfolio.highlight",
|
|
25
|
+
format: options.output,
|
|
26
|
+
updated: result,
|
|
27
|
+
prettySummary: `${result.id} highlight ${result.highlight ? "enabled" : "cleared"}`,
|
|
28
|
+
prettyEntity: (entity) => `highlight: ${entity.highlight.toString()}`,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=highlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.js","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/highlight.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,EAAU,EACV,OAAgD;IAEhD,MAAM,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,CAAC;IACrC,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,qBAAqB,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/E,IAAI,MAA0C,CAAC;IAC/C,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,oBAAoB,CAAC,qBAAqB,EAAE,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QACjE,OAAO;IACT,CAAC;IAED,iBAAiB,CAAC;QAChB,SAAS,EAAE,6BAA6B;QACxC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,GAAG,MAAM,CAAC,EAAE,cAAc,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE;QACnF,YAAY,EAAE,CAAC,MAA0C,EAAE,EAAE,CAAC,cAAc,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE;KAC1G,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Build the `ttctl profile portfolio` command tree.
|
|
4
|
+
*
|
|
5
|
+
* The canonical sub-domain name is `portfolio`; the CLI registers
|
|
6
|
+
* `projects` as a Commander.js alias so users can type either form. Per
|
|
7
|
+
* project policy (see issue #72), aliases are CLI-only — MCP tool names
|
|
8
|
+
* use ONLY the canonical name.
|
|
9
|
+
*
|
|
10
|
+
* The seven leaves follow the verb economy from the #68 epic:
|
|
11
|
+
* `add / update / remove / list / reorder / highlight / upload`. The
|
|
12
|
+
* `update` verb name is the user-facing CLI form; the core function is
|
|
13
|
+
* `update()` (no rename — verbs match between CLI and core for portfolio).
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildProfilePortfolioCommand(): Command;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAY5C;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,IAAI,OAAO,CA0JtD"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { Command, Option } from "commander";
|
|
4
|
+
import { OUTPUT_FORMATS } from "../../../lib/output.js";
|
|
5
|
+
import { runProfilePortfolioAdd } from "./add.js";
|
|
6
|
+
import { runProfilePortfolioHighlight } from "./highlight.js";
|
|
7
|
+
import { runProfilePortfolioList } from "./list.js";
|
|
8
|
+
import { runProfilePortfolioRemove } from "./remove.js";
|
|
9
|
+
import { runProfilePortfolioReorder } from "./reorder.js";
|
|
10
|
+
import { runProfilePortfolioUpdate } from "./update.js";
|
|
11
|
+
import { runProfilePortfolioUpload } from "./upload.js";
|
|
12
|
+
/**
|
|
13
|
+
* Build the `ttctl profile portfolio` command tree.
|
|
14
|
+
*
|
|
15
|
+
* The canonical sub-domain name is `portfolio`; the CLI registers
|
|
16
|
+
* `projects` as a Commander.js alias so users can type either form. Per
|
|
17
|
+
* project policy (see issue #72), aliases are CLI-only — MCP tool names
|
|
18
|
+
* use ONLY the canonical name.
|
|
19
|
+
*
|
|
20
|
+
* The seven leaves follow the verb economy from the #68 epic:
|
|
21
|
+
* `add / update / remove / list / reorder / highlight / upload`. The
|
|
22
|
+
* `update` verb name is the user-facing CLI form; the core function is
|
|
23
|
+
* `update()` (no rename — verbs match between CLI and core for portfolio).
|
|
24
|
+
*/
|
|
25
|
+
export function buildProfilePortfolioCommand() {
|
|
26
|
+
const portfolio = new Command("portfolio")
|
|
27
|
+
.alias("projects")
|
|
28
|
+
.description("View and update the portfolio section of your profile");
|
|
29
|
+
portfolio
|
|
30
|
+
.command("add")
|
|
31
|
+
.description("Create a new portfolio item")
|
|
32
|
+
.requiredOption("--title <text>", "portfolio item title")
|
|
33
|
+
.option("--description <text>", 'item description (inline text, "-" for stdin, or "@path" to read from file)')
|
|
34
|
+
.option("--edit", "open $EDITOR to compose the description interactively")
|
|
35
|
+
.option("--url <url>", "primary URL for the item (alias for --link)")
|
|
36
|
+
.option("--link <url>", "primary URL for the item (canonical flag, equivalent to --url)")
|
|
37
|
+
.option("--cover <file>", "path to a cover-image file to upload alongside the item")
|
|
38
|
+
.option("--industry-id <id>", 'catalog Industry id (repeatable; required — at least one). Discover via `ttctl profile industries autocomplete "<query>"`.', (value, prev) => (prev ? [...prev, value] : [value]))
|
|
39
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
40
|
+
.choices(OUTPUT_FORMATS)
|
|
41
|
+
.default("pretty"))
|
|
42
|
+
.action(async (options) => {
|
|
43
|
+
await runProfilePortfolioAdd(options);
|
|
44
|
+
});
|
|
45
|
+
portfolio
|
|
46
|
+
.command("update")
|
|
47
|
+
.description("Update fields on a portfolio item")
|
|
48
|
+
.argument("<id>", "id of the portfolio item to update")
|
|
49
|
+
.option("--title <text>", "portfolio item title")
|
|
50
|
+
.option("--description <text>", 'item description (inline text, "-" for stdin, or "@path" to read from file)')
|
|
51
|
+
.option("--edit", "open $EDITOR to compose the description interactively")
|
|
52
|
+
.option("--url <url>", "primary URL for the item (alias for --link)")
|
|
53
|
+
.option("--link <url>", "primary URL for the item (canonical flag, equivalent to --url)")
|
|
54
|
+
.option("--client <name>", "client/company name")
|
|
55
|
+
.option("--accomplishment <text>", "accomplishment summary")
|
|
56
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
57
|
+
.choices(OUTPUT_FORMATS)
|
|
58
|
+
.default("pretty"))
|
|
59
|
+
.action(async (id, options) => {
|
|
60
|
+
await runProfilePortfolioUpdate(id, options);
|
|
61
|
+
});
|
|
62
|
+
portfolio
|
|
63
|
+
.command("remove")
|
|
64
|
+
.alias("rm")
|
|
65
|
+
.description("Remove a portfolio item")
|
|
66
|
+
.argument("<id>", "id of the portfolio item to remove")
|
|
67
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
68
|
+
.choices(OUTPUT_FORMATS)
|
|
69
|
+
.default("pretty"))
|
|
70
|
+
.action(async (id, options) => {
|
|
71
|
+
await runProfilePortfolioRemove(id, options.output);
|
|
72
|
+
});
|
|
73
|
+
portfolio
|
|
74
|
+
.command("list")
|
|
75
|
+
.description("List portfolio items")
|
|
76
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
77
|
+
.choices(OUTPUT_FORMATS)
|
|
78
|
+
.default("pretty"))
|
|
79
|
+
.action(async (options) => {
|
|
80
|
+
await runProfilePortfolioList(options.output);
|
|
81
|
+
});
|
|
82
|
+
portfolio
|
|
83
|
+
.command("reorder")
|
|
84
|
+
.description("Reorder a portfolio item")
|
|
85
|
+
.argument("<id>", "id of the portfolio item to move")
|
|
86
|
+
.option("--before <id>", "place the item immediately before this neighbour id")
|
|
87
|
+
.option("--after <id>", "place the item immediately after this neighbour id")
|
|
88
|
+
.option("--to <position>", "place the item at this absolute 0-based position")
|
|
89
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
90
|
+
.choices(OUTPUT_FORMATS)
|
|
91
|
+
.default("pretty"))
|
|
92
|
+
.action(async (id, options) => {
|
|
93
|
+
await runProfilePortfolioReorder(id, options);
|
|
94
|
+
});
|
|
95
|
+
portfolio
|
|
96
|
+
.command("highlight")
|
|
97
|
+
.description("Toggle the highlight flag on a portfolio item (default: enable)")
|
|
98
|
+
.argument("<id>", "id of the portfolio item to highlight")
|
|
99
|
+
.option("--off", "clear the highlight flag instead of setting it")
|
|
100
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
101
|
+
.choices(OUTPUT_FORMATS)
|
|
102
|
+
.default("pretty"))
|
|
103
|
+
.action(async (id, options) => {
|
|
104
|
+
await runProfilePortfolioHighlight(id, options);
|
|
105
|
+
});
|
|
106
|
+
portfolio
|
|
107
|
+
.command("upload")
|
|
108
|
+
.description("Upload a cover image (--cover) or attachment file (--file) for the user's portfolio")
|
|
109
|
+
.argument("[id]", "(unused; reserved for future per-item upload routing)")
|
|
110
|
+
.option("--cover <file>", "path to a cover-image file to upload")
|
|
111
|
+
.option("--file <file>", "path to a portfolio-attachment file to upload")
|
|
112
|
+
.option("--crop <x,y,w,h>", "cover crop (px), comma-separated x,y,w,h; default: whole image (PNG) or sentinel oversize")
|
|
113
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
114
|
+
.choices(OUTPUT_FORMATS)
|
|
115
|
+
.default("pretty"))
|
|
116
|
+
.action(async (id, options) => {
|
|
117
|
+
await runProfilePortfolioUpload(id, options);
|
|
118
|
+
});
|
|
119
|
+
return portfolio;
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,4BAA4B;IAC1C,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC;SACvC,KAAK,CAAC,UAAU,CAAC;SACjB,WAAW,CAAC,uDAAuD,CAAC,CAAC;IAExE,SAAS;SACN,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,6BAA6B,CAAC;SAC1C,cAAc,CAAC,gBAAgB,EAAE,sBAAsB,CAAC;SACxD,MAAM,CAAC,sBAAsB,EAAE,6EAA6E,CAAC;SAC7G,MAAM,CA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Format } from "../../../lib/output.js";
|
|
3
|
+
/**
|
|
4
|
+
* Action handler for `ttctl profile portfolio list`. Reads the user's
|
|
5
|
+
* portfolio collection and emits it via the cross-CLI output helper
|
|
6
|
+
* (`packages/cli/src/lib/output.ts` from #71), wrapped in the v0.4
|
|
7
|
+
* list envelope (`{version, items, pageInfo?}` from #128) for
|
|
8
|
+
* json/yaml.
|
|
9
|
+
*
|
|
10
|
+
* Per #129, the `pretty` slot is registered with `emitResult` and
|
|
11
|
+
* unwraps the envelope's `items` field for the curated multi-line
|
|
12
|
+
* layout that surfaces `description`, `accomplishment`, `coverImage`,
|
|
13
|
+
* and `clientOrCompanyName` (the audit-confirmed dropped fields from
|
|
14
|
+
* #124). The `table` slot is also wired (also unwrapping `items`) —
|
|
15
|
+
* `formatResult`'s shape dispatcher prefers `table` for list-shape
|
|
16
|
+
* data when present, but the audit's Override Registry Decisions
|
|
17
|
+
* endorse routing portfolio list to multi-line because
|
|
18
|
+
* `description`/`accomplishment` are paragraph-length and the
|
|
19
|
+
* row-based table layout collapses them. {@link formatPortfolioTable}
|
|
20
|
+
* stays exported for direct test use and future override-dispatch
|
|
21
|
+
* wiring.
|
|
22
|
+
*
|
|
23
|
+
* Empty case is handled by the shared empty-state wrapper (#122) via
|
|
24
|
+
* `empty: { command: "profile.portfolio.list" }`. The wrapper detects
|
|
25
|
+
* both `[]` and `{items: []}` shapes (per #122's `isEmptyCollection`),
|
|
26
|
+
* so the post-#128 envelope wrapping continues to short-circuit
|
|
27
|
+
* BEFORE per-format dispatch — emitting `"No portfolio items found.
|
|
28
|
+
* Add one with: ttctl profile portfolio add"` for `pretty`, `[]` for
|
|
29
|
+
* `json`. The formatters keep a defensive empty-list branch for
|
|
30
|
+
* direct callers (tests, future programmatic use) that bypass the
|
|
31
|
+
* action handler.
|
|
32
|
+
*/
|
|
33
|
+
export declare function runProfilePortfolioList(format: OutputFormat): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Format the portfolio list as the post-#129 `pretty` summary. Pure —
|
|
36
|
+
* no I/O — directly unit-testable.
|
|
37
|
+
*
|
|
38
|
+
* Per-item layout, indented two spaces from the count header:
|
|
39
|
+
*
|
|
40
|
+
* <id>[ ★] <title>
|
|
41
|
+
* Client: <clientOrCompanyName> // skip-if-null
|
|
42
|
+
* URL: <link> // skip-if-null
|
|
43
|
+
* Cover: <coverImage> // skip-if-null
|
|
44
|
+
* Description: // always (renders (unset) on null)
|
|
45
|
+
* <body, paragraph breaks preserved>
|
|
46
|
+
* Accomplishment: // skip-if-null (multi-paragraph)
|
|
47
|
+
* <body>
|
|
48
|
+
*
|
|
49
|
+
* Items are separated by a single blank line. Field ordering for each
|
|
50
|
+
* item: identity (id, highlight star, title) first, then user-edited
|
|
51
|
+
* narrative (client, url, cover, description, accomplishment) — most
|
|
52
|
+
* user-edited last because they're the multi-line block fields that
|
|
53
|
+
* benefit from sticking to the bottom of the item.
|
|
54
|
+
*
|
|
55
|
+
* Closes the audit-confirmed formatter-root-cause defect from #124:
|
|
56
|
+
* `description`, `accomplishment`, `coverImage`, and
|
|
57
|
+
* `clientOrCompanyName` are now visible in the default output (the
|
|
58
|
+
* pre-#129 formatter dropped 7 of 12 entity fields).
|
|
59
|
+
*
|
|
60
|
+
* `tags` and `media` are NOT on the wire `PortfolioItem` — neither the
|
|
61
|
+
* mobile-gateway nor the talent-profile schema declares them. The audit
|
|
62
|
+
* flagged them as suspect; #127 verified absence empirically. They are
|
|
63
|
+
* deliberately omitted here.
|
|
64
|
+
*
|
|
65
|
+
* Pretty does NOT truncate (per the issue AC: "For long URLs / IDs:
|
|
66
|
+
* don't truncate (this is `pretty`, not `table`)"); the terminal wraps
|
|
67
|
+
* if the user's window is narrow.
|
|
68
|
+
*/
|
|
69
|
+
export declare function formatPortfolioPretty(items: profile.portfolio.PortfolioItem[]): string;
|
|
70
|
+
/**
|
|
71
|
+
* Format the portfolio list as a `cli-table3`-rendered table sized to
|
|
72
|
+
* the current terminal width. Restores the `clientOrCompanyName` column
|
|
73
|
+
* dropped by the pre-#129 formatter (audit-confirmed asymmetric drop:
|
|
74
|
+
* `text` had it, `table` didn't).
|
|
75
|
+
*
|
|
76
|
+
* Long-form fields (`description`, `accomplishment`) are NOT in the
|
|
77
|
+
* table — paragraph-length text doesn't fit a row layout. The override
|
|
78
|
+
* registry in `lib/format-overrides.ts` flags `profile portfolio list`
|
|
79
|
+
* as a candidate for the `multi-line` strategy; users wanting the full
|
|
80
|
+
* detail land on `pretty` (the post-#126 default).
|
|
81
|
+
*/
|
|
82
|
+
export declare function formatPortfolioTable(items: profile.portfolio.PortfolioItem[], terminalWidth?: number): string;
|
|
83
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/profile/portfolio/list.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAKtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBjF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,GAAG,MAAM,CAMtF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,EACxC,aAAa,GAAE,MAAqC,GACnD,MAAM,CAsBR"}
|