@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,42 @@
|
|
|
1
|
+
import { applications } from "@ttctl/core";
|
|
2
|
+
import type { OutputFormat } from "../../lib/output.js";
|
|
3
|
+
/**
|
|
4
|
+
* Action handler for `ttctl applications stats`. Issues N+1 calls (one
|
|
5
|
+
* per `JobActivityItemStatusGroupEnum` value) in parallel via the
|
|
6
|
+
* core service, surfaces a `{ total, groups: [{name, count}] }` shape.
|
|
7
|
+
*
|
|
8
|
+
* Each `count` is server-provided (the gateway's `totalCount`); no
|
|
9
|
+
* client-side synthesis. See `.tmp/workitem-15.md` § Open Questions
|
|
10
|
+
* (RESOLVED) for the scoping decision.
|
|
11
|
+
*
|
|
12
|
+
* **JSON shape rationale**: this leaf emits a BARE `{total, groups}`
|
|
13
|
+
* payload, NOT the locked v0.4 list envelope (`{version, items, pageInfo?}`
|
|
14
|
+
* from #128). The envelope is for `list` verbs whose payload IS a
|
|
15
|
+
* collection — it expresses pagination uniformity. `stats` is an
|
|
16
|
+
* aggregate scalar grouping; wrapping it in `{items: [...]}` would
|
|
17
|
+
* misrepresent the shape (consumers would expect to iterate `items` like
|
|
18
|
+
* a list, when each entry is a count, not an entity). The bare shape is
|
|
19
|
+
* the right ABI for an aggregate, and keeping it bare avoids over-
|
|
20
|
+
* extending the envelope's semantics. If a future epic wants to
|
|
21
|
+
* version aggregate payloads, that's an additive `{version, ...}`
|
|
22
|
+
* change at the top level.
|
|
23
|
+
*/
|
|
24
|
+
export declare function runApplicationsStats(output: OutputFormat): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Render the stats payload as a small table plus a total line.
|
|
27
|
+
* Pure — directly unit-testable.
|
|
28
|
+
*
|
|
29
|
+
* 5 status groups, 124 total activity items:
|
|
30
|
+
*
|
|
31
|
+
* ┌────────────┬───────┐
|
|
32
|
+
* │ group │ count │
|
|
33
|
+
* ├────────────┼───────┤
|
|
34
|
+
* │ Active │ 2 │
|
|
35
|
+
* │ Recruiter │ 5 │
|
|
36
|
+
* │ Client │ 0 │
|
|
37
|
+
* │ Closed │ 1 │
|
|
38
|
+
* │ Archived │ 116 │
|
|
39
|
+
* └────────────┴───────┘
|
|
40
|
+
*/
|
|
41
|
+
export declare function formatStatsPretty(stats: applications.ApplicationsStats): string;
|
|
42
|
+
//# sourceMappingURL=stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../../../src/commands/applications/stats.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAa9E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,CAAC,iBAAiB,GAAG,MAAM,CAU/E"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import Table from "cli-table3";
|
|
4
|
+
import { applications } from "@ttctl/core";
|
|
5
|
+
import { emitResult } from "../../lib/output.js";
|
|
6
|
+
import { shortenStatusGroup } from "./list.js";
|
|
7
|
+
import { handleApplicationsError, loadAuthTokenOrExit } from "./shared.js";
|
|
8
|
+
/**
|
|
9
|
+
* Action handler for `ttctl applications stats`. Issues N+1 calls (one
|
|
10
|
+
* per `JobActivityItemStatusGroupEnum` value) in parallel via the
|
|
11
|
+
* core service, surfaces a `{ total, groups: [{name, count}] }` shape.
|
|
12
|
+
*
|
|
13
|
+
* Each `count` is server-provided (the gateway's `totalCount`); no
|
|
14
|
+
* client-side synthesis. See `.tmp/workitem-15.md` § Open Questions
|
|
15
|
+
* (RESOLVED) for the scoping decision.
|
|
16
|
+
*
|
|
17
|
+
* **JSON shape rationale**: this leaf emits a BARE `{total, groups}`
|
|
18
|
+
* payload, NOT the locked v0.4 list envelope (`{version, items, pageInfo?}`
|
|
19
|
+
* from #128). The envelope is for `list` verbs whose payload IS a
|
|
20
|
+
* collection — it expresses pagination uniformity. `stats` is an
|
|
21
|
+
* aggregate scalar grouping; wrapping it in `{items: [...]}` would
|
|
22
|
+
* misrepresent the shape (consumers would expect to iterate `items` like
|
|
23
|
+
* a list, when each entry is a count, not an entity). The bare shape is
|
|
24
|
+
* the right ABI for an aggregate, and keeping it bare avoids over-
|
|
25
|
+
* extending the envelope's semantics. If a future epic wants to
|
|
26
|
+
* version aggregate payloads, that's an additive `{version, ...}`
|
|
27
|
+
* change at the top level.
|
|
28
|
+
*/
|
|
29
|
+
export async function runApplicationsStats(output) {
|
|
30
|
+
const token = await loadAuthTokenOrExit("applications stats", output);
|
|
31
|
+
let result;
|
|
32
|
+
try {
|
|
33
|
+
result = await applications.stats(token);
|
|
34
|
+
}
|
|
35
|
+
catch (err) {
|
|
36
|
+
handleApplicationsError("applications stats", err, output);
|
|
37
|
+
}
|
|
38
|
+
emitResult(result, output, {
|
|
39
|
+
pretty: (data) => formatStatsPretty(data),
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Render the stats payload as a small table plus a total line.
|
|
44
|
+
* Pure — directly unit-testable.
|
|
45
|
+
*
|
|
46
|
+
* 5 status groups, 124 total activity items:
|
|
47
|
+
*
|
|
48
|
+
* ┌────────────┬───────┐
|
|
49
|
+
* │ group │ count │
|
|
50
|
+
* ├────────────┼───────┤
|
|
51
|
+
* │ Active │ 2 │
|
|
52
|
+
* │ Recruiter │ 5 │
|
|
53
|
+
* │ Client │ 0 │
|
|
54
|
+
* │ Closed │ 1 │
|
|
55
|
+
* │ Archived │ 116 │
|
|
56
|
+
* └────────────┴───────┘
|
|
57
|
+
*/
|
|
58
|
+
export function formatStatsPretty(stats) {
|
|
59
|
+
const header = `${stats.groups.length.toString()} status groups, ${stats.total.toString()} total activity items:`;
|
|
60
|
+
const table = new Table({
|
|
61
|
+
head: ["group", "count"],
|
|
62
|
+
colAligns: ["left", "right"],
|
|
63
|
+
});
|
|
64
|
+
for (const g of stats.groups) {
|
|
65
|
+
table.push([shortenStatusGroup(g.name), g.count.toString()]);
|
|
66
|
+
}
|
|
67
|
+
return [header, "", table.toString()].join("\n");
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=stats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/commands/applications/stats.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAAoB;IAC7D,MAAM,KAAK,GAAG,MAAM,mBAAmB,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IAEtE,IAAI,MAAsC,CAAC;IAC3C,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,uBAAuB,CAAC,oBAAoB,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC;IAED,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE;QACzB,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC;KAC1C,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAqC;IACrE,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,mBAAmB,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAClH,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC;QACtB,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QACxB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;KAC7B,CAAC,CAAC;IACH,KAAK,MAAM,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Register the `auth` command tree on the parent program.
|
|
4
|
+
*
|
|
5
|
+
* The auth subcommand surface is a noun-verb tree: `auth init`, `auth
|
|
6
|
+
* status`, `auth signin`, `auth signout`. The status / signin / signout
|
|
7
|
+
* trio share the same `-o, --output` option (post-#126: `pretty` default
|
|
8
|
+
* via `OUTPUT_FORMATS`, with `json` and `yaml` available — pre-#126 the
|
|
9
|
+
* auth surface defaulted to `table`, which collapsed into `pretty`);
|
|
10
|
+
* `auth init` is purely interactive and produces a side-effect (file on
|
|
11
|
+
* disk), so its surface is a confirmation line (no `-o` flag).
|
|
12
|
+
*
|
|
13
|
+
* The parent `auth` command itself prints help when invoked without a
|
|
14
|
+
* sub-command (commander default), which is the desired UX.
|
|
15
|
+
*/
|
|
16
|
+
export declare function registerAuthCommand(parent: Command): void;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAazC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAuDzD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
|
+
// Copyright (C) 2026 Oleksii PELYKH
|
|
3
|
+
import { Option } from "commander";
|
|
4
|
+
import { OUTPUT_FORMATS } from "../../lib/output.js";
|
|
5
|
+
import { exitCodeForInitResult, formatInitOutput, runAuthInit } from "./init.js";
|
|
6
|
+
import { runAuthSignIn } from "./signin.js";
|
|
7
|
+
import { runAuthSignOut } from "./signout.js";
|
|
8
|
+
import { runAuthStatus } from "./status.js";
|
|
9
|
+
/**
|
|
10
|
+
* Register the `auth` command tree on the parent program.
|
|
11
|
+
*
|
|
12
|
+
* The auth subcommand surface is a noun-verb tree: `auth init`, `auth
|
|
13
|
+
* status`, `auth signin`, `auth signout`. The status / signin / signout
|
|
14
|
+
* trio share the same `-o, --output` option (post-#126: `pretty` default
|
|
15
|
+
* via `OUTPUT_FORMATS`, with `json` and `yaml` available — pre-#126 the
|
|
16
|
+
* auth surface defaulted to `table`, which collapsed into `pretty`);
|
|
17
|
+
* `auth init` is purely interactive and produces a side-effect (file on
|
|
18
|
+
* disk), so its surface is a confirmation line (no `-o` flag).
|
|
19
|
+
*
|
|
20
|
+
* The parent `auth` command itself prints help when invoked without a
|
|
21
|
+
* sub-command (commander default), which is the desired UX.
|
|
22
|
+
*/
|
|
23
|
+
export function registerAuthCommand(parent) {
|
|
24
|
+
const auth = parent.command("auth").description("Manage authentication and session state");
|
|
25
|
+
auth
|
|
26
|
+
.command("init")
|
|
27
|
+
.description("Scaffold a fresh ~/.ttctl.yaml interactively (recommended first command)")
|
|
28
|
+
.addOption(new Option("--config <path>", "output path (default: ~/.ttctl.yaml)"))
|
|
29
|
+
.addOption(new Option("--force", "overwrite existing config (default: refuse)"))
|
|
30
|
+
.action(async (options) => {
|
|
31
|
+
const result = await runAuthInit(options);
|
|
32
|
+
// Output is already routed via clack's intro/outro/cancel for the
|
|
33
|
+
// interactive surface. The terminal exit-code contract still needs
|
|
34
|
+
// to fire — and for non-TTY refusal (where clack never ran) we
|
|
35
|
+
// also need to write the message ourselves.
|
|
36
|
+
if (result.status === "refused" && result.reason === "non-tty") {
|
|
37
|
+
process.stderr.write(formatInitOutput(result) + "\n");
|
|
38
|
+
}
|
|
39
|
+
process.exit(exitCodeForInitResult(result));
|
|
40
|
+
});
|
|
41
|
+
auth
|
|
42
|
+
.command("status")
|
|
43
|
+
.description("Report whether the current session is valid")
|
|
44
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
45
|
+
.choices(OUTPUT_FORMATS)
|
|
46
|
+
.default("pretty"))
|
|
47
|
+
.action(async (options) => {
|
|
48
|
+
await runAuthStatus(options);
|
|
49
|
+
});
|
|
50
|
+
auth
|
|
51
|
+
.command("signin")
|
|
52
|
+
.description("Sign in with credentials from .ttctl.yaml and persist the session")
|
|
53
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
54
|
+
.choices(OUTPUT_FORMATS)
|
|
55
|
+
.default("pretty"))
|
|
56
|
+
.action(async (options) => {
|
|
57
|
+
await runAuthSignIn(options);
|
|
58
|
+
});
|
|
59
|
+
auth
|
|
60
|
+
.command("signout")
|
|
61
|
+
.description("Clear the persisted session cookie jar (idempotent)")
|
|
62
|
+
.addOption(new Option("-o, --output <format>", "output format")
|
|
63
|
+
.choices(OUTPUT_FORMATS)
|
|
64
|
+
.default("pretty"))
|
|
65
|
+
.action(async (options) => {
|
|
66
|
+
await runAuthSignOut(options);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/auth/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEjF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAe;IACjD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,yCAAyC,CAAC,CAAC;IAE3F,IAAI;SACD,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,0EAA0E,CAAC;SACvF,SAAS,CAAC,IAAI,MAAM,CAAC,iBAAiB,EAAE,sCAAsC,CAAC,CAAC;SAChF,SAAS,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,6CAA6C,CAAC,CAAC;SAC/E,MAAM,CAAC,KAAK,EAAE,OAAwB,EAAE,EAAE;QACzC,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;QAC1C,kEAAkE;QAClE,mEAAmE;QACnE,+DAA+D;QAC/D,4CAA4C;QAC5C,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC/D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEL,IAAI;SACD,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,6CAA6C,CAAC;SAC1D,SAAS,CACR,IAAI,MAAM,CAAC,uBAAuB,EAAE,eAAe,CAAC;SACjD,OAAO,CAAC,cAAc,CAAC;SACvB,OAAO,CAAC,QAA+B,CAAC,CAC5C;SACA,MAAM,CAAC,KAAK,EAAE,OAA0B,EAAE,EAAE;QAC3C,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEL,IAAI;SACD,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,mEAAmE,CAAC;SAChF,SAAS,CACR,IAAI,MAAM,CAAC,uBAAuB,EAAE,eAAe,CAAC;SACjD,OAAO,CAAC,cAAc,CAAC;SACvB,OAAO,CAAC,QAA+B,CAAC,CAC5C;SACA,MAAM,CAAC,KAAK,EAAE,OAA0B,EAAE,EAAE;QAC3C,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEL,IAAI;SACD,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,qDAAqD,CAAC;SAClE,SAAS,CACR,IAAI,MAAM,CAAC,uBAAuB,EAAE,eAAe,CAAC;SACjD,OAAO,CAAC,cAAc,CAAC;SACvB,OAAO,CAAC,QAA+B,CAAC,CAC5C;SACA,MAAM,CAAC,KAAK,EAAE,OAA2B,EAAE,EAAE;QAC5C,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outcome shape for `runAuthInit`. The discriminated union lets unit tests
|
|
3
|
+
* assert specific terminal states (refusal kinds, abort kinds, success
|
|
4
|
+
* shape) without pattern-matching prose. The CLI surface turns this into
|
|
5
|
+
* stdout/stderr + an exit code via `formatInitOutput` + `exitCodeForInitResult`.
|
|
6
|
+
*/
|
|
7
|
+
export type AuthInitResult = {
|
|
8
|
+
status: "written";
|
|
9
|
+
path: string;
|
|
10
|
+
form: "A" | "B";
|
|
11
|
+
} | {
|
|
12
|
+
status: "refused";
|
|
13
|
+
reason: "non-tty" | "exists" | "cancelled";
|
|
14
|
+
message: string;
|
|
15
|
+
} | {
|
|
16
|
+
status: "error";
|
|
17
|
+
message: string;
|
|
18
|
+
};
|
|
19
|
+
export interface AuthInitOptions {
|
|
20
|
+
config?: string;
|
|
21
|
+
force?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Map an `AuthInitResult` to a process exit code.
|
|
25
|
+
*
|
|
26
|
+
* - `written` → 0 (success)
|
|
27
|
+
* - `refused`/anything → 1 (non-TTY, exists-without-force, cancelled)
|
|
28
|
+
* - `error` → 1 (any unexpected failure)
|
|
29
|
+
*
|
|
30
|
+
* The cancelled / refused-form-B paths are intentionally non-zero — the
|
|
31
|
+
* shell convention is "exit 0 only on success." A user who hits Ctrl-C
|
|
32
|
+
* mid-prompt has not bootstrapped a config; subsequent commands assuming
|
|
33
|
+
* one exists would fail, so signaling success here would mislead scripts.
|
|
34
|
+
*/
|
|
35
|
+
export declare function exitCodeForInitResult(result: AuthInitResult): number;
|
|
36
|
+
/**
|
|
37
|
+
* Render an `AuthInitResult` for stdout/stderr. Written → confirmation on
|
|
38
|
+
* stdout naming the path AND the form chosen (per AC). Refusals + errors
|
|
39
|
+
* → message on stderr.
|
|
40
|
+
*/
|
|
41
|
+
export declare function formatInitOutput(result: AuthInitResult): string;
|
|
42
|
+
/**
|
|
43
|
+
* Determine whether the current process has an interactive TTY on stdin.
|
|
44
|
+
* `@clack/prompts` produces undefined behavior when piped; we refuse
|
|
45
|
+
* cleanly BEFORE any prompt runs (FR-3.10 / non-TTY refusal AC).
|
|
46
|
+
*
|
|
47
|
+
* Exposed for unit tests that can't trivially set the TTY bit on stdin —
|
|
48
|
+
* tests stub this function to assert both branches deterministically.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isStdinTty(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Detection-and-listing surface, exposed for unit tests so they can stub
|
|
53
|
+
* the op CLI presence and listing results without spawning a real
|
|
54
|
+
* subprocess. Production callers use the default implementation
|
|
55
|
+
* (`detectOpCli` + `listOpVaults` + `listOpItems`).
|
|
56
|
+
*/
|
|
57
|
+
export interface OpCliInterface {
|
|
58
|
+
detect: () => boolean;
|
|
59
|
+
listVaults: () => {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
}[];
|
|
63
|
+
listItems: (vault: string) => {
|
|
64
|
+
id: string;
|
|
65
|
+
title: string;
|
|
66
|
+
}[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Default op CLI interface — shells out via `execFileSync`. Tests inject
|
|
70
|
+
* an alternative implementation via the second argument to `runAuthInit`.
|
|
71
|
+
*/
|
|
72
|
+
export declare const defaultOpCli: OpCliInterface;
|
|
73
|
+
/**
|
|
74
|
+
* Run the `auth init` interactive flow:
|
|
75
|
+
*
|
|
76
|
+
* 1. TTY gate — refuse non-TTY stdin BEFORE any prompt (CI safety).
|
|
77
|
+
* 2. Resolve target path; refuse pre-existing files unless `--force`.
|
|
78
|
+
* 3. Form selector (A / B).
|
|
79
|
+
* 4. Form A: detect `op` CLI; on present → vault picker, item picker,
|
|
80
|
+
* confirm → compose YAML. On absent OR list-failure → freeform
|
|
81
|
+
* `op://` text prompt with regex validation.
|
|
82
|
+
* 5. Form B: explicit confirmation gate (default `N` aborts cleanly);
|
|
83
|
+
* on `Y` → username (email) + password (masked) → compose YAML.
|
|
84
|
+
* 6. Persist via `writeNewConfig` — atomic temp+rename, mode 0o600,
|
|
85
|
+
* sync-root + symlink refusal applies.
|
|
86
|
+
* 7. Confirmation message names path AND form.
|
|
87
|
+
*
|
|
88
|
+
* Cancellation: `@clack/prompts` returns its `isCancel` symbol on
|
|
89
|
+
* Ctrl-C / Esc at any prompt; we intercept and produce a `cancelled`
|
|
90
|
+
* result so the user sees an "Aborted" line and exits non-zero (vs. a
|
|
91
|
+
* silently truncated write).
|
|
92
|
+
*
|
|
93
|
+
* Inputs: `options` from commander; `opCli` is dependency-injected so
|
|
94
|
+
* tests can inject a stubbed implementation without spawning real
|
|
95
|
+
* `op` subprocesses.
|
|
96
|
+
*/
|
|
97
|
+
export declare function runAuthInit(options: AuthInitOptions, opCli?: OpCliInterface): Promise<AuthInitResult>;
|
|
98
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/commands/auth/init.ts"],"names":[],"mappings":"AAaA;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACtB;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAAA;CAAE,GACpD;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClF;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAuFD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAM/D;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAQpC;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjD,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC/D;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,cAI1B,CAAC;AAqCF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,eAAe,EACxB,KAAK,GAAE,cAA6B,GACnC,OAAO,CAAC,cAAc,CAAC,CA+EzB"}
|