mcp-server-azure-devops 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +265 -0
- package/dist/clients/azure-devops.d.ts +105 -0
- package/dist/clients/azure-devops.js +492 -0
- package/dist/clients/azure-devops.js.map +1 -0
- package/dist/clients/azure-devops.spec.unit.d.ts +1 -0
- package/dist/clients/azure-devops.spec.unit.js +37 -0
- package/dist/clients/azure-devops.spec.unit.js.map +1 -0
- package/dist/extension.d.ts +3 -0
- package/dist/extension.js +93 -0
- package/dist/extension.js.map +1 -0
- package/dist/features/organizations/__test__/test-helpers.d.ts +13 -0
- package/dist/features/organizations/__test__/test-helpers.js +34 -0
- package/dist/features/organizations/__test__/test-helpers.js.map +1 -0
- package/dist/features/organizations/index.d.ts +13 -0
- package/dist/features/organizations/index.js +44 -0
- package/dist/features/organizations/index.js.map +1 -0
- package/dist/features/organizations/index.spec.unit.d.ts +1 -0
- package/dist/features/organizations/index.spec.unit.js +71 -0
- package/dist/features/organizations/index.spec.unit.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.d.ts +13 -0
- package/dist/features/organizations/list-organizations/feature.js +95 -0
- package/dist/features/organizations/list-organizations/feature.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.int.d.ts +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.int.js +32 -0
- package/dist/features/organizations/list-organizations/feature.spec.int.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.unit.d.ts +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.unit.js +110 -0
- package/dist/features/organizations/list-organizations/feature.spec.unit.js.map +1 -0
- package/dist/features/organizations/list-organizations/index.d.ts +2 -0
- package/dist/features/organizations/list-organizations/index.js +3 -0
- package/dist/features/organizations/list-organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/schema.d.ts +2 -0
- package/dist/features/organizations/list-organizations/schema.js +3 -0
- package/dist/features/organizations/list-organizations/schema.js.map +1 -0
- package/dist/features/organizations/schemas.d.ts +6 -0
- package/dist/features/organizations/schemas.js +7 -0
- package/dist/features/organizations/schemas.js.map +1 -0
- package/dist/features/organizations/tool-definitions.d.ts +5 -0
- package/dist/features/organizations/tool-definitions.js +13 -0
- package/dist/features/organizations/tool-definitions.js.map +1 -0
- package/dist/features/organizations/types.d.ts +21 -0
- package/dist/features/organizations/types.js +5 -0
- package/dist/features/organizations/types.js.map +1 -0
- package/dist/features/pipelines/artifacts.d.ts +11 -0
- package/dist/features/pipelines/artifacts.js +280 -0
- package/dist/features/pipelines/artifacts.js.map +1 -0
- package/dist/features/pipelines/artifacts.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/artifacts.spec.unit.js +98 -0
- package/dist/features/pipelines/artifacts.spec.unit.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.d.ts +3 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js +216 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.spec.unit.js +63 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.d.ts +2 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js +3 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.d.ts +17 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js +20 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/get-pipeline/feature.js +43 -0
- package/dist/features/pipelines/get-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.int.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.int.js +52 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.int.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.unit.js +87 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline/index.js +3 -0
- package/dist/features/pipelines/get-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/schema.d.ts +17 -0
- package/dist/features/pipelines/get-pipeline/schema.js +26 -0
- package/dist/features/pipelines/get-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js +54 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.spec.unit.js +79 -0
- package/dist/features/pipelines/get-pipeline-log/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-log/index.js +3 -0
- package/dist/features/pipelines/get-pipeline-log/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/schema.d.ts +26 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js +37 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js +73 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.spec.unit.js +154 -0
- package/dist/features/pipelines/get-pipeline-run/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run/index.js +3 -0
- package/dist/features/pipelines/get-pipeline-run/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/schema.d.ts +14 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js +16 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js.map +1 -0
- package/dist/features/pipelines/helpers.d.ts +3 -0
- package/dist/features/pipelines/helpers.js +25 -0
- package/dist/features/pipelines/helpers.js.map +1 -0
- package/dist/features/pipelines/index.d.ts +19 -0
- package/dist/features/pipelines/index.js +137 -0
- package/dist/features/pipelines/index.js.map +1 -0
- package/dist/features/pipelines/index.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/index.spec.unit.js +221 -0
- package/dist/features/pipelines/index.spec.unit.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.d.ts +3 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js +95 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.spec.unit.js +146 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js +3 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.d.ts +35 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js +47 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.d.ts +10 -0
- package/dist/features/pipelines/list-pipelines/feature.js +39 -0
- package/dist/features/pipelines/list-pipelines/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.int.d.ts +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.int.js +34 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.int.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.unit.js +89 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipelines/index.js +3 -0
- package/dist/features/pipelines/list-pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/schema.d.ts +17 -0
- package/dist/features/pipelines/list-pipelines/schema.js +20 -0
- package/dist/features/pipelines/list-pipelines/schema.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.d.ts +3 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js +92 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.spec.unit.js +98 -0
- package/dist/features/pipelines/pipeline-timeline/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/index.d.ts +2 -0
- package/dist/features/pipelines/pipeline-timeline/index.js +3 -0
- package/dist/features/pipelines/pipeline-timeline/index.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/schema.d.ts +23 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js +48 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js.map +1 -0
- package/dist/features/pipelines/tool-definitions.d.ts +5 -0
- package/dist/features/pipelines/tool-definitions.js +63 -0
- package/dist/features/pipelines/tool-definitions.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js +62 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.int.d.ts +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.int.js +83 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.int.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.unit.js +110 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/trigger-pipeline/index.js +3 -0
- package/dist/features/pipelines/trigger-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/schema.d.ts +41 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js +42 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/types.d.ts +122 -0
- package/dist/features/pipelines/types.js +2 -0
- package/dist/features/pipelines/types.js.map +1 -0
- package/dist/features/projects/__test__/test-helpers.d.ts +13 -0
- package/dist/features/projects/__test__/test-helpers.js +31 -0
- package/dist/features/projects/__test__/test-helpers.js.map +1 -0
- package/dist/features/projects/get-project/feature.d.ts +11 -0
- package/dist/features/projects/get-project/feature.js +26 -0
- package/dist/features/projects/get-project/feature.js.map +1 -0
- package/dist/features/projects/get-project/feature.spec.int.d.ts +1 -0
- package/dist/features/projects/get-project/feature.spec.int.js +37 -0
- package/dist/features/projects/get-project/feature.spec.int.js.map +1 -0
- package/dist/features/projects/get-project/feature.spec.unit.d.ts +1 -0
- package/dist/features/projects/get-project/feature.spec.unit.js +39 -0
- package/dist/features/projects/get-project/feature.spec.unit.js.map +1 -0
- package/dist/features/projects/get-project/index.d.ts +2 -0
- package/dist/features/projects/get-project/index.js +3 -0
- package/dist/features/projects/get-project/index.js.map +1 -0
- package/dist/features/projects/get-project/schema.d.ts +2 -0
- package/dist/features/projects/get-project/schema.js +3 -0
- package/dist/features/projects/get-project/schema.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.d.ts +78 -0
- package/dist/features/projects/get-project-details/feature.js +182 -0
- package/dist/features/projects/get-project-details/feature.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.spec.int.d.ts +1 -0
- package/dist/features/projects/get-project-details/feature.spec.int.js +118 -0
- package/dist/features/projects/get-project-details/feature.spec.int.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.spec.unit.d.ts +1 -0
- package/dist/features/projects/get-project-details/feature.spec.unit.js +377 -0
- package/dist/features/projects/get-project-details/feature.spec.unit.js.map +1 -0
- package/dist/features/projects/get-project-details/index.d.ts +2 -0
- package/dist/features/projects/get-project-details/index.js +3 -0
- package/dist/features/projects/get-project-details/index.js.map +1 -0
- package/dist/features/projects/get-project-details/schema.d.ts +2 -0
- package/dist/features/projects/get-project-details/schema.js +3 -0
- package/dist/features/projects/get-project-details/schema.js.map +1 -0
- package/dist/features/projects/index.d.ts +15 -0
- package/dist/features/projects/index.js +61 -0
- package/dist/features/projects/index.js.map +1 -0
- package/dist/features/projects/index.spec.unit.d.ts +1 -0
- package/dist/features/projects/index.spec.unit.js +129 -0
- package/dist/features/projects/index.spec.unit.js.map +1 -0
- package/dist/features/projects/list-projects/feature.d.ts +10 -0
- package/dist/features/projects/list-projects/feature.js +22 -0
- package/dist/features/projects/list-projects/feature.js.map +1 -0
- package/dist/features/projects/list-projects/feature.spec.int.d.ts +1 -0
- package/dist/features/projects/list-projects/feature.spec.int.js +52 -0
- package/dist/features/projects/list-projects/feature.spec.int.js.map +1 -0
- package/dist/features/projects/list-projects/index.d.ts +2 -0
- package/dist/features/projects/list-projects/index.js +3 -0
- package/dist/features/projects/list-projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/schema.d.ts +2 -0
- package/dist/features/projects/list-projects/schema.js +3 -0
- package/dist/features/projects/list-projects/schema.js.map +1 -0
- package/dist/features/projects/schemas.d.ts +64 -0
- package/dist/features/projects/schemas.js +73 -0
- package/dist/features/projects/schemas.js.map +1 -0
- package/dist/features/projects/tool-definitions.d.ts +5 -0
- package/dist/features/projects/tool-definitions.js +23 -0
- package/dist/features/projects/tool-definitions.js.map +1 -0
- package/dist/features/projects/types.d.ts +11 -0
- package/dist/features/projects/types.js +2 -0
- package/dist/features/projects/types.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.d.ts +13 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js +127 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.int.js +184 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.unit.js +257 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js +2 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.d.ts +12 -0
- package/dist/features/pull-requests/create-pull-request/feature.js +96 -0
- package/dist/features/pull-requests/create-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.int.js +109 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.unit.js +110 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/index.js +3 -0
- package/dist/features/pull-requests/create-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/schema.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/schema.js +3 -0
- package/dist/features/pull-requests/create-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.d.ts +6 -0
- package/dist/features/pull-requests/get-pull-request/feature.js +19 -0
- package/dist/features/pull-requests/get-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.int.js +107 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.unit.js +35 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/get-pull-request/index.js +3 -0
- package/dist/features/pull-requests/get-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.js +2 -0
- package/dist/features/pull-requests/get-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.d.ts +22 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js +57 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.spec.unit.js +75 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js +2 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.d.ts +51 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js +256 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.spec.unit.js +136 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js +2 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.d.ts +13 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js +85 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.int.js +214 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.unit.js +338 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js +2 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js.map +1 -0
- package/dist/features/pull-requests/index.d.ts +20 -0
- package/dist/features/pull-requests/index.js +138 -0
- package/dist/features/pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/index.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/index.spec.unit.js +259 -0
- package/dist/features/pull-requests/index.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.d.ts +17 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js +78 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.int.js +122 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.unit.js +178 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/index.d.ts +2 -0
- package/dist/features/pull-requests/list-pull-requests/index.js +3 -0
- package/dist/features/pull-requests/list-pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js +2 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js.map +1 -0
- package/dist/features/pull-requests/schemas.d.ts +318 -0
- package/dist/features/pull-requests/schemas.js +280 -0
- package/dist/features/pull-requests/schemas.js.map +1 -0
- package/dist/features/pull-requests/tool-definitions.d.ts +5 -0
- package/dist/features/pull-requests/tool-definitions.js +52 -0
- package/dist/features/pull-requests/tool-definitions.js.map +1 -0
- package/dist/features/pull-requests/types.d.ts +100 -0
- package/dist/features/pull-requests/types.js +2 -0
- package/dist/features/pull-requests/types.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.d.ts +9 -0
- package/dist/features/pull-requests/update-pull-request/feature.js +246 -0
- package/dist/features/pull-requests/update-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.int.js +160 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.unit.js +278 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/index.js +2 -0
- package/dist/features/pull-requests/update-pull-request/index.js.map +1 -0
- package/dist/features/releases/create-release/feature.d.ts +3 -0
- package/dist/features/releases/create-release/feature.js +48 -0
- package/dist/features/releases/create-release/feature.js.map +1 -0
- package/dist/features/releases/create-release/index.d.ts +2 -0
- package/dist/features/releases/create-release/index.js +3 -0
- package/dist/features/releases/create-release/index.js.map +1 -0
- package/dist/features/releases/create-release/schema.d.ts +20 -0
- package/dist/features/releases/create-release/schema.js +21 -0
- package/dist/features/releases/create-release/schema.js.map +1 -0
- package/dist/features/releases/deploy-release-stage/feature.d.ts +9 -0
- package/dist/features/releases/deploy-release-stage/feature.js +35 -0
- package/dist/features/releases/deploy-release-stage/feature.js.map +1 -0
- package/dist/features/releases/deploy-release-stage/index.d.ts +2 -0
- package/dist/features/releases/deploy-release-stage/index.js +3 -0
- package/dist/features/releases/deploy-release-stage/index.js.map +1 -0
- package/dist/features/releases/deploy-release-stage/schema.d.ts +17 -0
- package/dist/features/releases/deploy-release-stage/schema.js +17 -0
- package/dist/features/releases/deploy-release-stage/schema.js.map +1 -0
- package/dist/features/releases/get-release/feature.d.ts +3 -0
- package/dist/features/releases/get-release/feature.js +31 -0
- package/dist/features/releases/get-release/feature.js.map +1 -0
- package/dist/features/releases/get-release/index.d.ts +2 -0
- package/dist/features/releases/get-release/index.js +3 -0
- package/dist/features/releases/get-release/index.js.map +1 -0
- package/dist/features/releases/get-release/schema.d.ts +11 -0
- package/dist/features/releases/get-release/schema.js +10 -0
- package/dist/features/releases/get-release/schema.js.map +1 -0
- package/dist/features/releases/get-release-definition/feature.d.ts +3 -0
- package/dist/features/releases/get-release-definition/feature.js +31 -0
- package/dist/features/releases/get-release-definition/feature.js.map +1 -0
- package/dist/features/releases/get-release-definition/index.d.ts +2 -0
- package/dist/features/releases/get-release-definition/index.js +3 -0
- package/dist/features/releases/get-release-definition/index.js.map +1 -0
- package/dist/features/releases/get-release-definition/schema.d.ts +11 -0
- package/dist/features/releases/get-release-definition/schema.js +10 -0
- package/dist/features/releases/get-release-definition/schema.js.map +1 -0
- package/dist/features/releases/index.d.ts +11 -0
- package/dist/features/releases/index.js +102 -0
- package/dist/features/releases/index.js.map +1 -0
- package/dist/features/releases/list-release-definitions/feature.d.ts +3 -0
- package/dist/features/releases/list-release-definitions/feature.js +28 -0
- package/dist/features/releases/list-release-definitions/feature.js.map +1 -0
- package/dist/features/releases/list-release-definitions/index.d.ts +2 -0
- package/dist/features/releases/list-release-definitions/index.js +3 -0
- package/dist/features/releases/list-release-definitions/index.js.map +1 -0
- package/dist/features/releases/list-release-definitions/schema.d.ts +17 -0
- package/dist/features/releases/list-release-definitions/schema.js +21 -0
- package/dist/features/releases/list-release-definitions/schema.js.map +1 -0
- package/dist/features/releases/list-releases/feature.d.ts +3 -0
- package/dist/features/releases/list-releases/feature.js +28 -0
- package/dist/features/releases/list-releases/feature.js.map +1 -0
- package/dist/features/releases/list-releases/index.d.ts +2 -0
- package/dist/features/releases/list-releases/index.js +3 -0
- package/dist/features/releases/list-releases/index.js.map +1 -0
- package/dist/features/releases/list-releases/schema.d.ts +26 -0
- package/dist/features/releases/list-releases/schema.js +27 -0
- package/dist/features/releases/list-releases/schema.js.map +1 -0
- package/dist/features/releases/tool-definitions.d.ts +2 -0
- package/dist/features/releases/tool-definitions.js +46 -0
- package/dist/features/releases/tool-definitions.js.map +1 -0
- package/dist/features/releases/types.d.ts +32 -0
- package/dist/features/releases/types.js +2 -0
- package/dist/features/releases/types.js.map +1 -0
- package/dist/features/repositories/__test__/test-helpers.d.ts +13 -0
- package/dist/features/repositories/__test__/test-helpers.js +31 -0
- package/dist/features/repositories/__test__/test-helpers.js.map +1 -0
- package/dist/features/repositories/create-branch/feature.d.ts +6 -0
- package/dist/features/repositories/create-branch/feature.js +30 -0
- package/dist/features/repositories/create-branch/feature.js.map +1 -0
- package/dist/features/repositories/create-branch/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/create-branch/feature.spec.unit.js +34 -0
- package/dist/features/repositories/create-branch/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/create-branch/index.d.ts +1 -0
- package/dist/features/repositories/create-branch/index.js +2 -0
- package/dist/features/repositories/create-branch/index.js.map +1 -0
- package/dist/features/repositories/create-commit/feature.d.ts +6 -0
- package/dist/features/repositories/create-commit/feature.js +119 -0
- package/dist/features/repositories/create-commit/feature.js.map +1 -0
- package/dist/features/repositories/create-commit/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/create-commit/feature.spec.unit.js +155 -0
- package/dist/features/repositories/create-commit/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/create-commit/index.d.ts +1 -0
- package/dist/features/repositories/create-commit/index.js +2 -0
- package/dist/features/repositories/create-commit/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.d.ts +22 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js +299 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.int.js +87 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.unit.js +389 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/index.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js +3 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js +4 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.d.ts +23 -0
- package/dist/features/repositories/get-file-content/feature.js +93 -0
- package/dist/features/repositories/get-file-content/feature.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.int.js +84 -0
- package/dist/features/repositories/get-file-content/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.unit.js +126 -0
- package/dist/features/repositories/get-file-content/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-file-content/index.d.ts +2 -0
- package/dist/features/repositories/get-file-content/index.js +3 -0
- package/dist/features/repositories/get-file-content/index.js.map +1 -0
- package/dist/features/repositories/get-file-content/schema.d.ts +2 -0
- package/dist/features/repositories/get-file-content/schema.js +4 -0
- package/dist/features/repositories/get-file-content/schema.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.d.ts +12 -0
- package/dist/features/repositories/get-repository/feature.js +27 -0
- package/dist/features/repositories/get-repository/feature.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-repository/feature.spec.int.js +42 -0
- package/dist/features/repositories/get-repository/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-repository/feature.spec.unit.js +39 -0
- package/dist/features/repositories/get-repository/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-repository/index.d.ts +2 -0
- package/dist/features/repositories/get-repository/index.js +3 -0
- package/dist/features/repositories/get-repository/index.js.map +1 -0
- package/dist/features/repositories/get-repository/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository/schema.js +3 -0
- package/dist/features/repositories/get-repository/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.d.ts +11 -0
- package/dist/features/repositories/get-repository-details/feature.js +64 -0
- package/dist/features/repositories/get-repository-details/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.int.js +117 -0
- package/dist/features/repositories/get-repository-details/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.unit.js +253 -0
- package/dist/features/repositories/get-repository-details/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-repository-details/index.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/index.js +3 -0
- package/dist/features/repositories/get-repository-details/index.js.map +1 -0
- package/dist/features/repositories/get-repository-details/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/schema.js +3 -0
- package/dist/features/repositories/get-repository-details/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/feature.d.ts +6 -0
- package/dist/features/repositories/get-repository-tree/feature.js +62 -0
- package/dist/features/repositories/get-repository-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-repository-tree/feature.spec.unit.js +67 -0
- package/dist/features/repositories/get-repository-tree/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/index.d.ts +1 -0
- package/dist/features/repositories/get-repository-tree/index.js +2 -0
- package/dist/features/repositories/get-repository-tree/index.js.map +1 -0
- package/dist/features/repositories/index.d.ts +21 -0
- package/dist/features/repositories/index.js +160 -0
- package/dist/features/repositories/index.js.map +1 -0
- package/dist/features/repositories/index.spec.unit.d.ts +1 -0
- package/dist/features/repositories/index.spec.unit.js +289 -0
- package/dist/features/repositories/index.spec.unit.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.d.ts +6 -0
- package/dist/features/repositories/list-commits/feature.js +72 -0
- package/dist/features/repositories/list-commits/feature.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/list-commits/feature.spec.unit.js +56 -0
- package/dist/features/repositories/list-commits/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/list-commits/index.d.ts +1 -0
- package/dist/features/repositories/list-commits/index.js +2 -0
- package/dist/features/repositories/list-commits/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.d.ts +10 -0
- package/dist/features/repositories/list-repositories/feature.js +22 -0
- package/dist/features/repositories/list-repositories/feature.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.int.js +54 -0
- package/dist/features/repositories/list-repositories/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.unit.js +57 -0
- package/dist/features/repositories/list-repositories/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/list-repositories/index.d.ts +2 -0
- package/dist/features/repositories/list-repositories/index.js +3 -0
- package/dist/features/repositories/list-repositories/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/schema.d.ts +2 -0
- package/dist/features/repositories/list-repositories/schema.js +3 -0
- package/dist/features/repositories/list-repositories/schema.js.map +1 -0
- package/dist/features/repositories/schemas.d.ts +237 -0
- package/dist/features/repositories/schemas.js +303 -0
- package/dist/features/repositories/schemas.js.map +1 -0
- package/dist/features/repositories/tool-definitions.d.ts +5 -0
- package/dist/features/repositories/tool-definitions.js +91 -0
- package/dist/features/repositories/tool-definitions.js.map +1 -0
- package/dist/features/repositories/types.d.ts +167 -0
- package/dist/features/repositories/types.js +2 -0
- package/dist/features/repositories/types.js.map +1 -0
- package/dist/features/search/index.d.ts +15 -0
- package/dist/features/search/index.js +46 -0
- package/dist/features/search/index.js.map +1 -0
- package/dist/features/search/index.spec.unit.d.ts +1 -0
- package/dist/features/search/index.spec.unit.js +141 -0
- package/dist/features/search/index.spec.unit.js.map +1 -0
- package/dist/features/search/schemas.d.ts +171 -0
- package/dist/features/search/schemas.js +156 -0
- package/dist/features/search/schemas.js.map +1 -0
- package/dist/features/search/schemas.spec.unit.d.ts +0 -0
- package/dist/features/search/schemas.spec.unit.js +38 -0
- package/dist/features/search/schemas.spec.unit.js.map +1 -0
- package/dist/features/search/search-code/feature.d.ts +10 -0
- package/dist/features/search/search-code/feature.js +171 -0
- package/dist/features/search/search-code/feature.js.map +1 -0
- package/dist/features/search/search-code/feature.spec.int.d.ts +1 -0
- package/dist/features/search/search-code/feature.spec.int.js +190 -0
- package/dist/features/search/search-code/feature.spec.int.js.map +1 -0
- package/dist/features/search/search-code/feature.spec.unit.d.ts +1 -0
- package/dist/features/search/search-code/feature.spec.unit.js +963 -0
- package/dist/features/search/search-code/feature.spec.unit.js.map +1 -0
- package/dist/features/search/search-code/index.d.ts +2 -0
- package/dist/features/search/search-code/index.js +3 -0
- package/dist/features/search/search-code/index.js.map +1 -0
- package/dist/features/search/search-wiki/feature.d.ts +10 -0
- package/dist/features/search/search-wiki/feature.js +126 -0
- package/dist/features/search/search-wiki/feature.js.map +1 -0
- package/dist/features/search/search-wiki/feature.spec.int.d.ts +1 -0
- package/dist/features/search/search-wiki/feature.spec.int.js +65 -0
- package/dist/features/search/search-wiki/feature.spec.int.js.map +1 -0
- package/dist/features/search/search-wiki/feature.spec.unit.d.ts +1 -0
- package/dist/features/search/search-wiki/feature.spec.unit.js +171 -0
- package/dist/features/search/search-wiki/feature.spec.unit.js.map +1 -0
- package/dist/features/search/search-wiki/index.d.ts +1 -0
- package/dist/features/search/search-wiki/index.js +2 -0
- package/dist/features/search/search-wiki/index.js.map +1 -0
- package/dist/features/search/search-work-items/feature.d.ts +10 -0
- package/dist/features/search/search-work-items/feature.js +112 -0
- package/dist/features/search/search-work-items/feature.js.map +1 -0
- package/dist/features/search/search-work-items/feature.spec.int.d.ts +1 -0
- package/dist/features/search/search-work-items/feature.spec.int.js +148 -0
- package/dist/features/search/search-work-items/feature.spec.int.js.map +1 -0
- package/dist/features/search/search-work-items/feature.spec.unit.d.ts +1 -0
- package/dist/features/search/search-work-items/feature.spec.unit.js +337 -0
- package/dist/features/search/search-work-items/feature.spec.unit.js.map +1 -0
- package/dist/features/search/search-work-items/index.d.ts +1 -0
- package/dist/features/search/search-work-items/index.js +2 -0
- package/dist/features/search/search-work-items/index.js.map +1 -0
- package/dist/features/search/tool-definitions.d.ts +5 -0
- package/dist/features/search/tool-definitions.js +23 -0
- package/dist/features/search/tool-definitions.js.map +1 -0
- package/dist/features/search/types.d.ts +537 -0
- package/dist/features/search/types.js +2 -0
- package/dist/features/search/types.js.map +1 -0
- package/dist/features/users/get-me/feature.d.ts +12 -0
- package/dist/features/users/get-me/feature.js +90 -0
- package/dist/features/users/get-me/feature.js.map +1 -0
- package/dist/features/users/get-me/feature.spec.int.d.ts +1 -0
- package/dist/features/users/get-me/feature.spec.int.js +31 -0
- package/dist/features/users/get-me/feature.spec.int.js.map +1 -0
- package/dist/features/users/get-me/feature.spec.unit.d.ts +1 -0
- package/dist/features/users/get-me/feature.spec.unit.js +159 -0
- package/dist/features/users/get-me/feature.spec.unit.js.map +1 -0
- package/dist/features/users/get-me/index.d.ts +2 -0
- package/dist/features/users/get-me/index.js +3 -0
- package/dist/features/users/get-me/index.js.map +1 -0
- package/dist/features/users/get-me/schema.d.ts +2 -0
- package/dist/features/users/get-me/schema.js +3 -0
- package/dist/features/users/get-me/schema.js.map +1 -0
- package/dist/features/users/index.d.ts +17 -0
- package/dist/features/users/index.js +33 -0
- package/dist/features/users/index.js.map +1 -0
- package/dist/features/users/index.spec.unit.d.ts +1 -0
- package/dist/features/users/index.spec.unit.js +69 -0
- package/dist/features/users/index.spec.unit.js.map +1 -0
- package/dist/features/users/schemas.d.ts +5 -0
- package/dist/features/users/schemas.js +6 -0
- package/dist/features/users/schemas.js.map +1 -0
- package/dist/features/users/tool-definitions.d.ts +5 -0
- package/dist/features/users/tool-definitions.js +13 -0
- package/dist/features/users/tool-definitions.js.map +1 -0
- package/dist/features/users/types.d.ts +17 -0
- package/dist/features/users/types.js +2 -0
- package/dist/features/users/types.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.d.ts +49 -0
- package/dist/features/wikis/create-wiki/feature.js +53 -0
- package/dist/features/wikis/create-wiki/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.int.js +42 -0
- package/dist/features/wikis/create-wiki/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.unit.js +166 -0
- package/dist/features/wikis/create-wiki/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/create-wiki/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki/index.js +3 -0
- package/dist/features/wikis/create-wiki/index.js.map +1 -0
- package/dist/features/wikis/create-wiki/schema.d.ts +53 -0
- package/dist/features/wikis/create-wiki/schema.js +57 -0
- package/dist/features/wikis/create-wiki/schema.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.d.ts +18 -0
- package/dist/features/wikis/create-wiki-page/feature.js +58 -0
- package/dist/features/wikis/create-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.int.js +272 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.unit.js +139 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki-page/index.js +3 -0
- package/dist/features/wikis/create-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/schema.d.ts +26 -0
- package/dist/features/wikis/create-wiki-page/schema.js +33 -0
- package/dist/features/wikis/create-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.d.ts +33 -0
- package/dist/features/wikis/get-wiki-page/feature.js +32 -0
- package/dist/features/wikis/get-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.int.js +56 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.unit.js +86 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/get-wiki-page/index.js +3 -0
- package/dist/features/wikis/get-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/schema.d.ts +20 -0
- package/dist/features/wikis/get-wiki-page/schema.js +20 -0
- package/dist/features/wikis/get-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.d.ts +25 -0
- package/dist/features/wikis/get-wikis/feature.js +34 -0
- package/dist/features/wikis/get-wikis/feature.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.int.js +32 -0
- package/dist/features/wikis/get-wikis/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.unit.js +81 -0
- package/dist/features/wikis/get-wikis/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/get-wikis/index.d.ts +2 -0
- package/dist/features/wikis/get-wikis/index.js +3 -0
- package/dist/features/wikis/get-wikis/index.js.map +1 -0
- package/dist/features/wikis/get-wikis/schema.d.ts +14 -0
- package/dist/features/wikis/get-wikis/schema.js +18 -0
- package/dist/features/wikis/get-wikis/schema.js.map +1 -0
- package/dist/features/wikis/index.d.ts +16 -0
- package/dist/features/wikis/index.js +109 -0
- package/dist/features/wikis/index.js.map +1 -0
- package/dist/features/wikis/index.spec.unit.d.ts +1 -0
- package/dist/features/wikis/index.spec.unit.js +212 -0
- package/dist/features/wikis/index.spec.unit.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.d.ts +20 -0
- package/dist/features/wikis/list-wiki-pages/feature.js +43 -0
- package/dist/features/wikis/list-wiki-pages/feature.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.int.js +228 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.unit.js +392 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/index.d.ts +2 -0
- package/dist/features/wikis/list-wiki-pages/index.js +3 -0
- package/dist/features/wikis/list-wiki-pages/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/schema.d.ts +18 -0
- package/dist/features/wikis/list-wiki-pages/schema.js +19 -0
- package/dist/features/wikis/list-wiki-pages/schema.js.map +1 -0
- package/dist/features/wikis/tool-definitions.d.ts +5 -0
- package/dist/features/wikis/tool-definitions.js +43 -0
- package/dist/features/wikis/tool-definitions.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/feature.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/feature.js +27 -0
- package/dist/features/wikis/update-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/update-wiki-page/feature.spec.int.js +37 -0
- package/dist/features/wikis/update-wiki-page/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/update-wiki-page/index.js +3 -0
- package/dist/features/wikis/update-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/schema.d.ts +26 -0
- package/dist/features/wikis/update-wiki-page/schema.js +29 -0
- package/dist/features/wikis/update-wiki-page/schema.js.map +1 -0
- package/dist/features/work-items/__test__/fixtures.d.ts +9 -0
- package/dist/features/work-items/__test__/fixtures.js +23 -0
- package/dist/features/work-items/__test__/fixtures.js.map +1 -0
- package/dist/features/work-items/__test__/test-helpers.d.ts +13 -0
- package/dist/features/work-items/__test__/test-helpers.js +31 -0
- package/dist/features/work-items/__test__/test-helpers.js.map +1 -0
- package/dist/features/work-items/__test__/test-utils.d.ts +17 -0
- package/dist/features/work-items/__test__/test-utils.js +35 -0
- package/dist/features/work-items/__test__/test-utils.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/create-work-item/feature.js +96 -0
- package/dist/features/work-items/create-work-item/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.int.js +103 -0
- package/dist/features/work-items/create-work-item/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.unit.js +44 -0
- package/dist/features/work-items/create-work-item/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/create-work-item/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item/index.js +3 -0
- package/dist/features/work-items/create-work-item/index.js.map +1 -0
- package/dist/features/work-items/create-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item/schema.js +3 -0
- package/dist/features/work-items/create-work-item/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/get-work-item/feature.js +66 -0
- package/dist/features/work-items/get-work-item/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.int.js +136 -0
- package/dist/features/work-items/get-work-item/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.unit.js +29 -0
- package/dist/features/work-items/get-work-item/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/get-work-item/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item/index.js +3 -0
- package/dist/features/work-items/get-work-item/index.js.map +1 -0
- package/dist/features/work-items/get-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item/schema.js +3 -0
- package/dist/features/work-items/get-work-item/schema.js.map +1 -0
- package/dist/features/work-items/index.d.ts +17 -0
- package/dist/features/work-items/index.js +103 -0
- package/dist/features/work-items/index.js.map +1 -0
- package/dist/features/work-items/index.spec.unit.d.ts +1 -0
- package/dist/features/work-items/index.spec.unit.js +197 -0
- package/dist/features/work-items/index.spec.unit.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.d.ts +10 -0
- package/dist/features/work-items/list-work-items/feature.js +86 -0
- package/dist/features/work-items/list-work-items/feature.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.int.js +101 -0
- package/dist/features/work-items/list-work-items/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.unit.js +93 -0
- package/dist/features/work-items/list-work-items/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/list-work-items/index.d.ts +2 -0
- package/dist/features/work-items/list-work-items/index.js +3 -0
- package/dist/features/work-items/list-work-items/index.js.map +1 -0
- package/dist/features/work-items/list-work-items/schema.d.ts +2 -0
- package/dist/features/work-items/list-work-items/schema.js +3 -0
- package/dist/features/work-items/list-work-items/schema.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.d.ts +24 -0
- package/dist/features/work-items/manage-work-item-link/feature.js +73 -0
- package/dist/features/work-items/manage-work-item-link/feature.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.int.js +73 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.unit.js +135 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/index.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/index.js +3 -0
- package/dist/features/work-items/manage-work-item-link/index.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/schema.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/schema.js +3 -0
- package/dist/features/work-items/manage-work-item-link/schema.js.map +1 -0
- package/dist/features/work-items/schemas.d.ts +147 -0
- package/dist/features/work-items/schemas.js +131 -0
- package/dist/features/work-items/schemas.js.map +1 -0
- package/dist/features/work-items/tool-definitions.d.ts +5 -0
- package/dist/features/work-items/tool-definitions.js +33 -0
- package/dist/features/work-items/tool-definitions.js.map +1 -0
- package/dist/features/work-items/types.d.ts +39 -0
- package/dist/features/work-items/types.js +2 -0
- package/dist/features/work-items/types.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/update-work-item/feature.js +100 -0
- package/dist/features/work-items/update-work-item/feature.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.int.js +82 -0
- package/dist/features/work-items/update-work-item/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.unit.js +36 -0
- package/dist/features/work-items/update-work-item/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/update-work-item/index.d.ts +2 -0
- package/dist/features/work-items/update-work-item/index.js +3 -0
- package/dist/features/work-items/update-work-item/index.js.map +1 -0
- package/dist/features/work-items/update-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/update-work-item/schema.js +3 -0
- package/dist/features/work-items/update-work-item/schema.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +127931 -0
- package/dist/index.js.map +1 -0
- package/dist/index.spec.unit.d.ts +1 -0
- package/dist/index.spec.unit.js +81 -0
- package/dist/index.spec.unit.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +378 -0
- package/dist/server.js.map +1 -0
- package/dist/server.spec.e2e.d.ts +1 -0
- package/dist/server.spec.e2e.js +224 -0
- package/dist/server.spec.e2e.js.map +1 -0
- package/dist/setup-env.spec.unit.d.ts +1 -0
- package/dist/setup-env.spec.unit.js +144 -0
- package/dist/setup-env.spec.unit.js.map +1 -0
- package/dist/setup.d.ts +6 -0
- package/dist/setup.js +124 -0
- package/dist/setup.js.map +1 -0
- package/dist/shared/api/client.d.ts +91 -0
- package/dist/shared/api/client.js +238 -0
- package/dist/shared/api/client.js.map +1 -0
- package/dist/shared/api/index.d.ts +1 -0
- package/dist/shared/api/index.js +2 -0
- package/dist/shared/api/index.js.map +1 -0
- package/dist/shared/auth/auth-factory.d.ts +43 -0
- package/dist/shared/auth/auth-factory.js +136 -0
- package/dist/shared/auth/auth-factory.js.map +1 -0
- package/dist/shared/auth/auth-factory.spec.unit.d.ts +1 -0
- package/dist/shared/auth/auth-factory.spec.unit.js +36 -0
- package/dist/shared/auth/auth-factory.spec.unit.js.map +1 -0
- package/dist/shared/auth/client-factory.d.ts +109 -0
- package/dist/shared/auth/client-factory.js +268 -0
- package/dist/shared/auth/client-factory.js.map +1 -0
- package/dist/shared/auth/index.d.ts +11 -0
- package/dist/shared/auth/index.js +12 -0
- package/dist/shared/auth/index.js.map +1 -0
- package/dist/shared/azure-devops-url.d.ts +17 -0
- package/dist/shared/azure-devops-url.js +116 -0
- package/dist/shared/azure-devops-url.js.map +1 -0
- package/dist/shared/azure-devops-url.spec.unit.d.ts +1 -0
- package/dist/shared/azure-devops-url.spec.unit.js +101 -0
- package/dist/shared/azure-devops-url.spec.unit.js.map +1 -0
- package/dist/shared/config/index.d.ts +1 -0
- package/dist/shared/config/index.js +2 -0
- package/dist/shared/config/index.js.map +1 -0
- package/dist/shared/config/version.d.ts +4 -0
- package/dist/shared/config/version.js +5 -0
- package/dist/shared/config/version.js.map +1 -0
- package/dist/shared/enums/index.d.ts +40 -0
- package/dist/shared/enums/index.js +81 -0
- package/dist/shared/enums/index.js.map +1 -0
- package/dist/shared/enums/index.spec.unit.d.ts +1 -0
- package/dist/shared/enums/index.spec.unit.js +73 -0
- package/dist/shared/enums/index.spec.unit.js.map +1 -0
- package/dist/shared/errors/azure-devops-errors.d.ts +107 -0
- package/dist/shared/errors/azure-devops-errors.js +150 -0
- package/dist/shared/errors/azure-devops-errors.js.map +1 -0
- package/dist/shared/errors/handle-request-error.d.ts +31 -0
- package/dist/shared/errors/handle-request-error.js +91 -0
- package/dist/shared/errors/handle-request-error.js.map +1 -0
- package/dist/shared/errors/index.d.ts +1 -0
- package/dist/shared/errors/index.js +2 -0
- package/dist/shared/errors/index.js.map +1 -0
- package/dist/shared/test/test-helpers.d.ts +20 -0
- package/dist/shared/test/test-helpers.js +52 -0
- package/dist/shared/test/test-helpers.js.map +1 -0
- package/dist/shared/types/config.d.ts +27 -0
- package/dist/shared/types/config.js +2 -0
- package/dist/shared/types/config.js.map +1 -0
- package/dist/shared/types/index.d.ts +1 -0
- package/dist/shared/types/index.js +2 -0
- package/dist/shared/types/index.js.map +1 -0
- package/dist/shared/types/request-handler.d.ts +21 -0
- package/dist/shared/types/request-handler.js +2 -0
- package/dist/shared/types/request-handler.js.map +1 -0
- package/dist/shared/types/tool-definition.d.ts +10 -0
- package/dist/shared/types/tool-definition.js +2 -0
- package/dist/shared/types/tool-definition.js.map +1 -0
- package/dist/shared/utils/serialize.d.ts +7 -0
- package/dist/shared/utils/serialize.js +21 -0
- package/dist/shared/utils/serialize.js.map +1 -0
- package/dist/utils/environment.d.ts +15 -0
- package/dist/utils/environment.js +45 -0
- package/dist/utils/environment.js.map +1 -0
- package/dist/utils/environment.spec.unit.d.ts +1 -0
- package/dist/utils/environment.spec.unit.js +62 -0
- package/dist/utils/environment.spec.unit.js.map +1 -0
- package/docs/SOLUTION_SUMMARY.md +145 -0
- package/docs/authentication.md +267 -0
- package/docs/azure-identity-authentication.md +187 -0
- package/docs/ci-setup.md +61 -0
- package/docs/examples/README.md +33 -0
- package/docs/examples/azure-cli-authentication.env +25 -0
- package/docs/examples/azure-identity-authentication.env +33 -0
- package/docs/examples/pat-authentication.env +24 -0
- package/docs/important-knowledge/azure-devops-rest-api-research.md +88 -0
- package/docs/important-knowledge/llm-tldr-cli.md +37 -0
- package/docs/npm-trusted-publishers-migration.md +142 -0
- package/docs/release-troubleshooting.md +153 -0
- package/docs/testing/README.md +140 -0
- package/docs/testing/setup.md +72 -0
- package/docs/tools/README.md +73 -0
- package/docs/tools/core-navigation.md +114 -0
- package/docs/tools/organizations.md +73 -0
- package/docs/tools/pipelines.md +532 -0
- package/docs/tools/projects.md +114 -0
- package/docs/tools/pull-requests.md +1108 -0
- package/docs/tools/repositories.md +610 -0
- package/docs/tools/resources.md +133 -0
- package/docs/tools/search.md +165 -0
- package/docs/tools/user-tools.md +39 -0
- package/docs/tools/wiki.md +192 -0
- package/docs/tools/work-items.md +182 -0
- package/package.json +129 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { AzureDevOpsError, AzureDevOpsAuthenticationError } from '../errors';
|
|
2
|
+
import { AuthenticationMethod } from '../auth';
|
|
3
|
+
import { AzureDevOpsClient as SharedClient } from '../auth/client-factory';
|
|
4
|
+
/**
|
|
5
|
+
* Azure DevOps Client
|
|
6
|
+
*
|
|
7
|
+
* Provides access to Azure DevOps APIs
|
|
8
|
+
*/
|
|
9
|
+
export class AzureDevOpsClient {
|
|
10
|
+
config;
|
|
11
|
+
clientPromise = null;
|
|
12
|
+
constructor(config) {
|
|
13
|
+
this.config = config;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get the authenticated Azure DevOps client
|
|
17
|
+
*
|
|
18
|
+
* @returns The authenticated WebApi client
|
|
19
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
20
|
+
*/
|
|
21
|
+
async getClient() {
|
|
22
|
+
if (!this.clientPromise) {
|
|
23
|
+
this.clientPromise = (async () => {
|
|
24
|
+
try {
|
|
25
|
+
const sharedClient = new SharedClient({
|
|
26
|
+
method: AuthenticationMethod.PersonalAccessToken,
|
|
27
|
+
organizationUrl: this.config.orgUrl,
|
|
28
|
+
personalAccessToken: this.config.pat,
|
|
29
|
+
});
|
|
30
|
+
return await sharedClient.getWebApiClient();
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
34
|
+
if (error instanceof AzureDevOpsError) {
|
|
35
|
+
throw error;
|
|
36
|
+
}
|
|
37
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
38
|
+
throw new AzureDevOpsAuthenticationError(error instanceof Error
|
|
39
|
+
? `Authentication failed: ${error.message}`
|
|
40
|
+
: 'Authentication failed: Unknown error');
|
|
41
|
+
}
|
|
42
|
+
})();
|
|
43
|
+
}
|
|
44
|
+
return this.clientPromise;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if the client is authenticated
|
|
48
|
+
*
|
|
49
|
+
* @returns True if the client is authenticated
|
|
50
|
+
*/
|
|
51
|
+
async isAuthenticated() {
|
|
52
|
+
try {
|
|
53
|
+
const client = await this.getClient();
|
|
54
|
+
return !!client;
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// Any error means we're not authenticated
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Get the Core API
|
|
63
|
+
*
|
|
64
|
+
* @returns The Core API client
|
|
65
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
66
|
+
*/
|
|
67
|
+
async getCoreApi() {
|
|
68
|
+
try {
|
|
69
|
+
const client = await this.getClient();
|
|
70
|
+
return await client.getCoreApi();
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
74
|
+
if (error instanceof AzureDevOpsError) {
|
|
75
|
+
throw error;
|
|
76
|
+
}
|
|
77
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
78
|
+
throw new AzureDevOpsAuthenticationError(error instanceof Error
|
|
79
|
+
? `Failed to get Core API: ${error.message}`
|
|
80
|
+
: 'Failed to get Core API: Unknown error');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get the Git API
|
|
85
|
+
*
|
|
86
|
+
* @returns The Git API client
|
|
87
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
88
|
+
*/
|
|
89
|
+
async getGitApi() {
|
|
90
|
+
try {
|
|
91
|
+
const client = await this.getClient();
|
|
92
|
+
return await client.getGitApi();
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
96
|
+
if (error instanceof AzureDevOpsError) {
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
99
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
100
|
+
throw new AzureDevOpsAuthenticationError(error instanceof Error
|
|
101
|
+
? `Failed to get Git API: ${error.message}`
|
|
102
|
+
: 'Failed to get Git API: Unknown error');
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get the Work Item Tracking API
|
|
107
|
+
*
|
|
108
|
+
* @returns The Work Item Tracking API client
|
|
109
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
110
|
+
*/
|
|
111
|
+
async getWorkItemTrackingApi() {
|
|
112
|
+
try {
|
|
113
|
+
const client = await this.getClient();
|
|
114
|
+
return await client.getWorkItemTrackingApi();
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
118
|
+
if (error instanceof AzureDevOpsError) {
|
|
119
|
+
throw error;
|
|
120
|
+
}
|
|
121
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
122
|
+
throw new AzureDevOpsAuthenticationError(error instanceof Error
|
|
123
|
+
? `Failed to get Work Item Tracking API: ${error.message}`
|
|
124
|
+
: 'Failed to get Work Item Tracking API: Unknown error');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get the Build API
|
|
129
|
+
*
|
|
130
|
+
* @returns The Build API client
|
|
131
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
132
|
+
*/
|
|
133
|
+
async getBuildApi() {
|
|
134
|
+
try {
|
|
135
|
+
const client = await this.getClient();
|
|
136
|
+
return await client.getBuildApi();
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
140
|
+
if (error instanceof AzureDevOpsError) {
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
143
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
144
|
+
throw new AzureDevOpsAuthenticationError(error instanceof Error
|
|
145
|
+
? `Failed to get Build API: ${error.message}`
|
|
146
|
+
: 'Failed to get Build API: Unknown error');
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Get the Test API
|
|
151
|
+
*
|
|
152
|
+
* @returns The Test API client
|
|
153
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
154
|
+
*/
|
|
155
|
+
async getTestApi() {
|
|
156
|
+
try {
|
|
157
|
+
const client = await this.getClient();
|
|
158
|
+
return await client.getTestApi();
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
162
|
+
if (error instanceof AzureDevOpsError) {
|
|
163
|
+
throw error;
|
|
164
|
+
}
|
|
165
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
166
|
+
throw new AzureDevOpsAuthenticationError(error instanceof Error
|
|
167
|
+
? `Failed to get Test API: ${error.message}`
|
|
168
|
+
: 'Failed to get Test API: Unknown error');
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Get the Release API
|
|
173
|
+
*
|
|
174
|
+
* @returns The Release API client
|
|
175
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
176
|
+
*/
|
|
177
|
+
async getReleaseApi() {
|
|
178
|
+
try {
|
|
179
|
+
const client = await this.getClient();
|
|
180
|
+
return await client.getReleaseApi();
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
184
|
+
if (error instanceof AzureDevOpsError) {
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
187
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
188
|
+
throw new AzureDevOpsAuthenticationError(error instanceof Error
|
|
189
|
+
? `Failed to get Release API: ${error.message}`
|
|
190
|
+
: 'Failed to get Release API: Unknown error');
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Get the Task Agent API
|
|
195
|
+
*
|
|
196
|
+
* @returns The Task Agent API client
|
|
197
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
198
|
+
*/
|
|
199
|
+
async getTaskAgentApi() {
|
|
200
|
+
try {
|
|
201
|
+
const client = await this.getClient();
|
|
202
|
+
return await client.getTaskAgentApi();
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
206
|
+
if (error instanceof AzureDevOpsError) {
|
|
207
|
+
throw error;
|
|
208
|
+
}
|
|
209
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
210
|
+
throw new AzureDevOpsAuthenticationError(error instanceof Error
|
|
211
|
+
? `Failed to get Task Agent API: ${error.message}`
|
|
212
|
+
: 'Failed to get Task Agent API: Unknown error');
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Get the Task API
|
|
217
|
+
*
|
|
218
|
+
* @returns The Task API client
|
|
219
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
220
|
+
*/
|
|
221
|
+
async getTaskApi() {
|
|
222
|
+
try {
|
|
223
|
+
const client = await this.getClient();
|
|
224
|
+
return await client.getTaskApi();
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
228
|
+
if (error instanceof AzureDevOpsError) {
|
|
229
|
+
throw error;
|
|
230
|
+
}
|
|
231
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
232
|
+
throw new AzureDevOpsAuthenticationError(error instanceof Error
|
|
233
|
+
? `Failed to get Task API: ${error.message}`
|
|
234
|
+
: 'Failed to get Task API: Unknown error');
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/shared/api/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAO3E;;;;GAIG;AACH,MAAM,OAAO,iBAAiB;IACpB,MAAM,CAA0B;IAChC,aAAa,GAA2B,IAAI,CAAC;IAErD,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACK,KAAK,CAAC,SAAS;QACrB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,aAAa,GAAG,CAAC,KAAK,IAAI,EAAE;gBAC/B,IAAI,CAAC;oBACH,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC;wBACpC,MAAM,EAAE,oBAAoB,CAAC,mBAAmB;wBAChD,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;wBACnC,mBAAmB,EAAE,IAAI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MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;YACtC,OAAO,MAAM,MAAM,CAAC,eAAe,EAAE,CAAC;QACxC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,kDAAkD;YAClD,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;gBACtC,MAAM,KAAK,CAAC;YACd,CAAC;YACD,0DAA0D;YAC1D,MAAM,IAAI,8BAA8B,CACtC,KAAK,YAAY,KAAK;gBACpB,CAAC,CAAC,iCAAiC,KAAK,CAAC,OAAO,EAAE;gBAClD,CAAC,CAAC,6CAA6C,CAClD,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,UAAU;QACrB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;YACtC,OAAO,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,kDAAkD;YAClD,IAAI,KAAK,YAAY,gBAAgB,EAAE,CAAC;gBACtC,MAAM,KAAK,CAAC;YACd,CAAC;YACD,0DAA0D;YAC1D,MAAM,IAAI,8BAA8B,CACtC,KAAK,YAAY,KAAK;gBACpB,CAAC,CAAC,2BAA2B,KAAK,CAAC,OAAO,EAAE;gBAC5C,CAAC,CAAC,uCAAuC,CAC5C,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './client';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
/**
|
|
3
|
+
* Authentication methods supported by the Azure DevOps client
|
|
4
|
+
*/
|
|
5
|
+
export declare enum AuthenticationMethod {
|
|
6
|
+
/**
|
|
7
|
+
* Personal Access Token authentication
|
|
8
|
+
*/
|
|
9
|
+
PersonalAccessToken = "pat",
|
|
10
|
+
/**
|
|
11
|
+
* Azure Identity authentication (DefaultAzureCredential)
|
|
12
|
+
*/
|
|
13
|
+
AzureIdentity = "azure-identity",
|
|
14
|
+
/**
|
|
15
|
+
* Azure CLI authentication (AzureCliCredential)
|
|
16
|
+
*/
|
|
17
|
+
AzureCli = "azure-cli"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Authentication configuration for Azure DevOps
|
|
21
|
+
*/
|
|
22
|
+
export interface AuthConfig {
|
|
23
|
+
/**
|
|
24
|
+
* Authentication method to use
|
|
25
|
+
*/
|
|
26
|
+
method: AuthenticationMethod;
|
|
27
|
+
/**
|
|
28
|
+
* Organization URL (e.g., https://dev.azure.com/myorg)
|
|
29
|
+
*/
|
|
30
|
+
organizationUrl: string;
|
|
31
|
+
/**
|
|
32
|
+
* Personal Access Token for Azure DevOps (required for PAT authentication)
|
|
33
|
+
*/
|
|
34
|
+
personalAccessToken?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Creates an authenticated client for Azure DevOps API based on the specified authentication method
|
|
38
|
+
*
|
|
39
|
+
* @param config Authentication configuration
|
|
40
|
+
* @returns Authenticated WebApi client
|
|
41
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
42
|
+
*/
|
|
43
|
+
export declare function createAuthClient(config: AuthConfig): Promise<WebApi>;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { WebApi, getPersonalAccessTokenHandler } from 'azure-devops-node-api';
|
|
2
|
+
import { BearerCredentialHandler } from 'azure-devops-node-api/handlers/bearertoken';
|
|
3
|
+
import { DefaultAzureCredential, AzureCliCredential } from '@azure/identity';
|
|
4
|
+
import { AzureDevOpsAuthenticationError } from '../errors';
|
|
5
|
+
import { isAzureDevOpsServicesUrl } from '../azure-devops-url';
|
|
6
|
+
/**
|
|
7
|
+
* Authentication methods supported by the Azure DevOps client
|
|
8
|
+
*/
|
|
9
|
+
export var AuthenticationMethod;
|
|
10
|
+
(function (AuthenticationMethod) {
|
|
11
|
+
/**
|
|
12
|
+
* Personal Access Token authentication
|
|
13
|
+
*/
|
|
14
|
+
AuthenticationMethod["PersonalAccessToken"] = "pat";
|
|
15
|
+
/**
|
|
16
|
+
* Azure Identity authentication (DefaultAzureCredential)
|
|
17
|
+
*/
|
|
18
|
+
AuthenticationMethod["AzureIdentity"] = "azure-identity";
|
|
19
|
+
/**
|
|
20
|
+
* Azure CLI authentication (AzureCliCredential)
|
|
21
|
+
*/
|
|
22
|
+
AuthenticationMethod["AzureCli"] = "azure-cli";
|
|
23
|
+
})(AuthenticationMethod || (AuthenticationMethod = {}));
|
|
24
|
+
/**
|
|
25
|
+
* Azure DevOps resource ID for token acquisition
|
|
26
|
+
*/
|
|
27
|
+
const AZURE_DEVOPS_RESOURCE_ID = '499b84ac-1321-427f-aa17-267ca6975798';
|
|
28
|
+
/**
|
|
29
|
+
* Creates an authenticated client for Azure DevOps API based on the specified authentication method
|
|
30
|
+
*
|
|
31
|
+
* @param config Authentication configuration
|
|
32
|
+
* @returns Authenticated WebApi client
|
|
33
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
34
|
+
*/
|
|
35
|
+
export async function createAuthClient(config) {
|
|
36
|
+
if (!config.organizationUrl) {
|
|
37
|
+
throw new AzureDevOpsAuthenticationError('Organization URL is required');
|
|
38
|
+
}
|
|
39
|
+
if (!isAzureDevOpsServicesUrl(config.organizationUrl) &&
|
|
40
|
+
config.method !== AuthenticationMethod.PersonalAccessToken) {
|
|
41
|
+
throw new AzureDevOpsAuthenticationError('Azure DevOps Server requires Personal Access Token authentication');
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
let client;
|
|
45
|
+
switch (config.method) {
|
|
46
|
+
case AuthenticationMethod.PersonalAccessToken:
|
|
47
|
+
client = await createPatClient(config);
|
|
48
|
+
break;
|
|
49
|
+
case AuthenticationMethod.AzureIdentity:
|
|
50
|
+
client = await createAzureIdentityClient(config);
|
|
51
|
+
break;
|
|
52
|
+
case AuthenticationMethod.AzureCli:
|
|
53
|
+
client = await createAzureCliClient(config);
|
|
54
|
+
break;
|
|
55
|
+
default:
|
|
56
|
+
throw new AzureDevOpsAuthenticationError(`Unsupported authentication method: ${config.method}`);
|
|
57
|
+
}
|
|
58
|
+
// Test the connection
|
|
59
|
+
const locationsApi = await client.getLocationsApi();
|
|
60
|
+
await locationsApi.getResourceAreas();
|
|
61
|
+
return client;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if (error instanceof AzureDevOpsAuthenticationError) {
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
throw new AzureDevOpsAuthenticationError(`Failed to authenticate with Azure DevOps: ${error instanceof Error ? error.message : String(error)}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates a client using Personal Access Token authentication
|
|
72
|
+
*
|
|
73
|
+
* @param config Authentication configuration
|
|
74
|
+
* @returns Authenticated WebApi client
|
|
75
|
+
* @throws {AzureDevOpsAuthenticationError} If PAT is missing or authentication fails
|
|
76
|
+
*/
|
|
77
|
+
async function createPatClient(config) {
|
|
78
|
+
if (!config.personalAccessToken) {
|
|
79
|
+
throw new AzureDevOpsAuthenticationError('Personal Access Token is required');
|
|
80
|
+
}
|
|
81
|
+
// Create authentication handler using PAT
|
|
82
|
+
const authHandler = getPersonalAccessTokenHandler(config.personalAccessToken);
|
|
83
|
+
// Create API client with the auth handler
|
|
84
|
+
return new WebApi(config.organizationUrl, authHandler);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Creates a client using DefaultAzureCredential authentication
|
|
88
|
+
*
|
|
89
|
+
* @param config Authentication configuration
|
|
90
|
+
* @returns Authenticated WebApi client
|
|
91
|
+
* @throws {AzureDevOpsAuthenticationError} If token acquisition fails
|
|
92
|
+
*/
|
|
93
|
+
async function createAzureIdentityClient(config) {
|
|
94
|
+
try {
|
|
95
|
+
// Create DefaultAzureCredential
|
|
96
|
+
const credential = new DefaultAzureCredential();
|
|
97
|
+
// Get token for Azure DevOps
|
|
98
|
+
const token = await credential.getToken(`${AZURE_DEVOPS_RESOURCE_ID}/.default`);
|
|
99
|
+
if (!token || !token.token) {
|
|
100
|
+
throw new Error('Failed to acquire token');
|
|
101
|
+
}
|
|
102
|
+
// Create bearer token handler
|
|
103
|
+
const authHandler = new BearerCredentialHandler(token.token);
|
|
104
|
+
// Create API client with the auth handler
|
|
105
|
+
return new WebApi(config.organizationUrl, authHandler);
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
throw new AzureDevOpsAuthenticationError(`Failed to acquire Azure Identity token: ${error instanceof Error ? error.message : String(error)}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Creates a client using AzureCliCredential authentication
|
|
113
|
+
*
|
|
114
|
+
* @param config Authentication configuration
|
|
115
|
+
* @returns Authenticated WebApi client
|
|
116
|
+
* @throws {AzureDevOpsAuthenticationError} If token acquisition fails
|
|
117
|
+
*/
|
|
118
|
+
async function createAzureCliClient(config) {
|
|
119
|
+
try {
|
|
120
|
+
// Create AzureCliCredential
|
|
121
|
+
const credential = new AzureCliCredential();
|
|
122
|
+
// Get token for Azure DevOps
|
|
123
|
+
const token = await credential.getToken(`${AZURE_DEVOPS_RESOURCE_ID}/.default`);
|
|
124
|
+
if (!token || !token.token) {
|
|
125
|
+
throw new Error('Failed to acquire token');
|
|
126
|
+
}
|
|
127
|
+
// Create bearer token handler
|
|
128
|
+
const authHandler = new BearerCredentialHandler(token.token);
|
|
129
|
+
// Create API client with the auth handler
|
|
130
|
+
return new WebApi(config.organizationUrl, authHandler);
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
throw new AzureDevOpsAuthenticationError(`Failed to acquire Azure CLI token: ${error instanceof Error ? error.message : String(error)}`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=auth-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-factory.js","sourceRoot":"","sources":["../../../src/shared/auth/auth-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAN,IAAY,oBAeX;AAfD,WAAY,oBAAoB;IAC9B;;OAEG;IACH,mDAA2B,CAAA;IAE3B;;OAEG;IACH,wDAAgC,CAAA;IAEhC;;OAEG;IACH,8CAAsB,CAAA;AACxB,CAAC,EAfW,oBAAoB,KAApB,oBAAoB,QAe/B;AAsBD;;GAEG;AACH,MAAM,wBAAwB,GAAG,sCAAsC,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAAkB;IACvD,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;QAC5B,MAAM,IAAI,8BAA8B,CAAC,8BAA8B,CAAC,CAAC;IAC3E,CAAC;IAED,IACE,CAAC,wBAAwB,CAAC,MAAM,CAAC,eAAe,CAAC;QACjD,MAAM,CAAC,MAAM,KAAK,oBAAoB,CAAC,mBAAmB,EAC1D,CAAC;QACD,MAAM,IAAI,8BAA8B,CACtC,mEAAmE,CACpE,CAAC;IACJ,CAAC;IAED,IAAI,CAAC;QACH,IAAI,MAAc,CAAC;QAEnB,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;YACtB,KAAK,oBAAoB,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M,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,8BAA8B,CACtC,sCAAsC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC/F,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createAuthClient, AuthenticationMethod } from './auth-factory';
|
|
2
|
+
import { AzureDevOpsAuthenticationError } from '../errors';
|
|
3
|
+
jest.mock('azure-devops-node-api', () => ({
|
|
4
|
+
WebApi: jest.fn().mockImplementation(() => ({
|
|
5
|
+
getLocationsApi: jest.fn().mockResolvedValue({
|
|
6
|
+
getResourceAreas: jest.fn().mockResolvedValue([]),
|
|
7
|
+
}),
|
|
8
|
+
})),
|
|
9
|
+
getPersonalAccessTokenHandler: jest.fn().mockReturnValue({}),
|
|
10
|
+
}));
|
|
11
|
+
jest.mock('@azure/identity', () => ({
|
|
12
|
+
DefaultAzureCredential: jest.fn(),
|
|
13
|
+
AzureCliCredential: jest.fn(),
|
|
14
|
+
}));
|
|
15
|
+
describe('createAuthClient server auth guard', () => {
|
|
16
|
+
it('rejects Azure Identity for Azure DevOps Server URLs', async () => {
|
|
17
|
+
await expect(createAuthClient({
|
|
18
|
+
method: AuthenticationMethod.AzureIdentity,
|
|
19
|
+
organizationUrl: 'https://ado.local/tfs/DefaultCollection',
|
|
20
|
+
})).rejects.toThrow(AzureDevOpsAuthenticationError);
|
|
21
|
+
});
|
|
22
|
+
it('rejects Azure CLI auth for Azure DevOps Server URLs', async () => {
|
|
23
|
+
await expect(createAuthClient({
|
|
24
|
+
method: AuthenticationMethod.AzureCli,
|
|
25
|
+
organizationUrl: 'https://ado.local/tfs/DefaultCollection',
|
|
26
|
+
})).rejects.toThrow(AzureDevOpsAuthenticationError);
|
|
27
|
+
});
|
|
28
|
+
it('allows PAT auth for Azure DevOps Server URLs', async () => {
|
|
29
|
+
await expect(createAuthClient({
|
|
30
|
+
method: AuthenticationMethod.PersonalAccessToken,
|
|
31
|
+
organizationUrl: 'https://ado.local/tfs/DefaultCollection',
|
|
32
|
+
personalAccessToken: 'test-pat',
|
|
33
|
+
})).resolves.toBeDefined();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=auth-factory.spec.unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-factory.spec.unit.js","sourceRoot":"","sources":["../../../src/shared/auth/auth-factory.spec.unit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAE3D,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,GAAG,EAAE,CAAC,CAAC;IACxC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAC;QAC1C,eAAe,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC;YAC3C,gBAAgB,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC;SAClD,CAAC;KACH,CAAC,CAAC;IACH,6BAA6B,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;CAC7D,CAAC,CAAC,CAAC;AAEJ,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,CAAC,CAAC;IAClC,sBAAsB,EAAE,IAAI,CAAC,EAAE,EAAE;IACjC,kBAAkB,EAAE,IAAI,CAAC,EAAE,EAAE;CAC9B,CAAC,CAAC,CAAC;AAEJ,QAAQ,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAClD,EAAE,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;QACnE,MAAM,MAAM,CACV,gBAAgB,CAAC;YACf,MAAM,EAAE,oBAAoB,CAAC,aAAa;YAC1C,eAAe,EAAE,yCAAyC;SAC3D,CAAC,CACH,CAAC,OAAO,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;QACnE,MAAM,MAAM,CACV,gBAAgB,CAAC;YACf,MAAM,EAAE,oBAAoB,CAAC,QAAQ;YACrC,eAAe,EAAE,yCAAyC;SAC3D,CAAC,CACH,CAAC,OAAO,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC5D,MAAM,MAAM,CACV,gBAAgB,CAAC;YACf,MAAM,EAAE,oBAAoB,CAAC,mBAAmB;YAChD,eAAe,EAAE,yCAAyC;YAC1D,mBAAmB,EAAE,UAAU;SAChC,CAAC,CACH,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
import { ICoreApi } from 'azure-devops-node-api/CoreApi';
|
|
3
|
+
import { IGitApi } from 'azure-devops-node-api/GitApi';
|
|
4
|
+
import { IWorkItemTrackingApi } from 'azure-devops-node-api/WorkItemTrackingApi';
|
|
5
|
+
import { IBuildApi } from 'azure-devops-node-api/BuildApi';
|
|
6
|
+
import { ITestApi } from 'azure-devops-node-api/TestApi';
|
|
7
|
+
import { IReleaseApi } from 'azure-devops-node-api/ReleaseApi';
|
|
8
|
+
import { ITaskAgentApi } from 'azure-devops-node-api/TaskAgentApi';
|
|
9
|
+
import { ITaskApi } from 'azure-devops-node-api/TaskApi';
|
|
10
|
+
import { IProfileApi } from 'azure-devops-node-api/ProfileApi';
|
|
11
|
+
import { AuthConfig } from './auth-factory';
|
|
12
|
+
/**
|
|
13
|
+
* Azure DevOps Client
|
|
14
|
+
*
|
|
15
|
+
* Provides access to Azure DevOps APIs using the configured authentication method
|
|
16
|
+
*/
|
|
17
|
+
export declare class AzureDevOpsClient {
|
|
18
|
+
private config;
|
|
19
|
+
private clientPromise;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new Azure DevOps client
|
|
22
|
+
*
|
|
23
|
+
* @param config Authentication configuration
|
|
24
|
+
*/
|
|
25
|
+
constructor(config: AuthConfig);
|
|
26
|
+
/**
|
|
27
|
+
* Get the authenticated Azure DevOps client
|
|
28
|
+
*
|
|
29
|
+
* @returns The authenticated WebApi client
|
|
30
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
31
|
+
*/
|
|
32
|
+
private getClient;
|
|
33
|
+
/**
|
|
34
|
+
* Get the underlying WebApi client
|
|
35
|
+
*
|
|
36
|
+
* @returns The authenticated WebApi client
|
|
37
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
38
|
+
*/
|
|
39
|
+
getWebApiClient(): Promise<WebApi>;
|
|
40
|
+
/**
|
|
41
|
+
* Check if the client is authenticated
|
|
42
|
+
*
|
|
43
|
+
* @returns True if the client is authenticated
|
|
44
|
+
*/
|
|
45
|
+
isAuthenticated(): Promise<boolean>;
|
|
46
|
+
/**
|
|
47
|
+
* Get the Core API
|
|
48
|
+
*
|
|
49
|
+
* @returns The Core API client
|
|
50
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
51
|
+
*/
|
|
52
|
+
getCoreApi(): Promise<ICoreApi>;
|
|
53
|
+
/**
|
|
54
|
+
* Get the Git API
|
|
55
|
+
*
|
|
56
|
+
* @returns The Git API client
|
|
57
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
58
|
+
*/
|
|
59
|
+
getGitApi(): Promise<IGitApi>;
|
|
60
|
+
/**
|
|
61
|
+
* Get the Work Item Tracking API
|
|
62
|
+
*
|
|
63
|
+
* @returns The Work Item Tracking API client
|
|
64
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
65
|
+
*/
|
|
66
|
+
getWorkItemTrackingApi(): Promise<IWorkItemTrackingApi>;
|
|
67
|
+
/**
|
|
68
|
+
* Get the Build API
|
|
69
|
+
*
|
|
70
|
+
* @returns The Build API client
|
|
71
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
72
|
+
*/
|
|
73
|
+
getBuildApi(): Promise<IBuildApi>;
|
|
74
|
+
/**
|
|
75
|
+
* Get the Test API
|
|
76
|
+
*
|
|
77
|
+
* @returns The Test API client
|
|
78
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
79
|
+
*/
|
|
80
|
+
getTestApi(): Promise<ITestApi>;
|
|
81
|
+
/**
|
|
82
|
+
* Get the Release API
|
|
83
|
+
*
|
|
84
|
+
* @returns The Release API client
|
|
85
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
86
|
+
*/
|
|
87
|
+
getReleaseApi(): Promise<IReleaseApi>;
|
|
88
|
+
/**
|
|
89
|
+
* Get the Task Agent API
|
|
90
|
+
*
|
|
91
|
+
* @returns The Task Agent API client
|
|
92
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
93
|
+
*/
|
|
94
|
+
getTaskAgentApi(): Promise<ITaskAgentApi>;
|
|
95
|
+
/**
|
|
96
|
+
* Get the Task API
|
|
97
|
+
*
|
|
98
|
+
* @returns The Task API client
|
|
99
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
100
|
+
*/
|
|
101
|
+
getTaskApi(): Promise<ITaskApi>;
|
|
102
|
+
/**
|
|
103
|
+
* Get the Profile API
|
|
104
|
+
*
|
|
105
|
+
* @returns The Profile API client
|
|
106
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
107
|
+
*/
|
|
108
|
+
getProfileApi(): Promise<IProfileApi>;
|
|
109
|
+
}
|