@aqajooon/mcp-server-azure-devops 0.0.0-stage → 0.1.55
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 +318 -2
- package/dist/clients/azure-devops.d.ts +105 -0
- package/dist/clients/azure-devops.js +501 -0
- package/dist/clients/azure-devops.js.map +1 -0
- package/dist/features/environments/feature.d.ts +24 -0
- package/dist/features/environments/feature.js +48 -0
- package/dist/features/environments/feature.js.map +1 -0
- package/dist/features/environments/index.d.ts +10 -0
- package/dist/features/environments/index.js +42 -0
- package/dist/features/environments/index.js.map +1 -0
- package/dist/features/environments/schema.d.ts +7 -0
- package/dist/features/environments/schema.js +28 -0
- package/dist/features/environments/schema.js.map +1 -0
- package/dist/features/libraries/feature.d.ts +27 -0
- package/dist/features/libraries/feature.js +47 -0
- package/dist/features/libraries/feature.js.map +1 -0
- package/dist/features/libraries/index.d.ts +10 -0
- package/dist/features/libraries/index.js +42 -0
- package/dist/features/libraries/index.js.map +1 -0
- package/dist/features/libraries/schema.d.ts +7 -0
- package/dist/features/libraries/schema.js +27 -0
- package/dist/features/libraries/schema.js.map +1 -0
- package/dist/features/organizations/__test__/test-helpers.d.ts +13 -0
- package/dist/features/organizations/__test__/test-helpers.js +38 -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 +63 -0
- package/dist/features/organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.d.ts +13 -0
- package/dist/features/organizations/list-organizations/feature.js +101 -0
- package/dist/features/organizations/list-organizations/feature.js.map +1 -0
- package/dist/features/organizations/list-organizations/index.d.ts +2 -0
- package/dist/features/organizations/list-organizations/index.js +19 -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 +6 -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 +10 -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 +16 -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 +8 -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 +288 -0
- package/dist/features/pipelines/artifacts.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 +222 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.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 +19 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.d.ts +7 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js +23 -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 +46 -0
- package/dist/features/pipelines/get-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline/index.js +19 -0
- package/dist/features/pipelines/get-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/schema.d.ts +9 -0
- package/dist/features/pipelines/get-pipeline/schema.js +29 -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 +57 -0
- package/dist/features/pipelines/get-pipeline-log/feature.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 +19 -0
- package/dist/features/pipelines/get-pipeline-log/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/schema.d.ts +13 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js +40 -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 +76 -0
- package/dist/features/pipelines/get-pipeline-run/feature.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 +19 -0
- package/dist/features/pipelines/get-pipeline-run/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.d.ts +26 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.js +105 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.d.ts +47 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.js +185 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.d.ts +7 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.js +21 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.d.ts +41 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.js +450 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.js.map +1 -0
- package/dist/features/pipelines/helpers.d.ts +3 -0
- package/dist/features/pipelines/helpers.js +29 -0
- package/dist/features/pipelines/helpers.js.map +1 -0
- package/dist/features/pipelines/index.d.ts +22 -0
- package/dist/features/pipelines/index.js +216 -0
- package/dist/features/pipelines/index.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 +98 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.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 +19 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.d.ts +28 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js +50 -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 +42 -0
- package/dist/features/pipelines/list-pipelines/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipelines/index.js +19 -0
- package/dist/features/pipelines/list-pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/schema.d.ts +9 -0
- package/dist/features/pipelines/list-pipelines/schema.js +23 -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 +95 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/index.d.ts +2 -0
- package/dist/features/pipelines/pipeline-timeline/index.js +19 -0
- package/dist/features/pipelines/pipeline-timeline/index.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/schema.d.ts +31 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js +51 -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 +87 -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 +65 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/trigger-pipeline/index.js +8 -0
- package/dist/features/pipelines/trigger-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/schema.d.ts +15 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js +45 -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 +3 -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 +35 -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 +29 -0
- package/dist/features/projects/get-project/feature.js.map +1 -0
- package/dist/features/projects/get-project/index.d.ts +2 -0
- package/dist/features/projects/get-project/index.js +19 -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 +6 -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 +185 -0
- package/dist/features/projects/get-project-details/feature.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 +8 -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 +6 -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 +80 -0
- package/dist/features/projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/feature.d.ts +10 -0
- package/dist/features/projects/list-projects/feature.js +25 -0
- package/dist/features/projects/list-projects/feature.js.map +1 -0
- package/dist/features/projects/list-projects/index.d.ts +2 -0
- package/dist/features/projects/list-projects/index.js +19 -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 +6 -0
- package/dist/features/projects/list-projects/schema.js.map +1 -0
- package/dist/features/projects/schemas.d.ts +30 -0
- package/dist/features/projects/schemas.js +76 -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 +26 -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 +3 -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 +161 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.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 +18 -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 +99 -0
- package/dist/features/pull-requests/create-pull-request/feature.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 +19 -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 +6 -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 +22 -0
- package/dist/features/pull-requests/get-pull-request/feature.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 +19 -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 +6 -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 +60 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.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 +18 -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 +259 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.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 +18 -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 +88 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.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 +18 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js.map +1 -0
- package/dist/features/pull-requests/index.d.ts +21 -0
- package/dist/features/pull-requests/index.js +167 -0
- package/dist/features/pull-requests/index.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 +81 -0
- package/dist/features/pull-requests/list-pull-requests/feature.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 +19 -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 +6 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js.map +1 -0
- package/dist/features/pull-requests/schemas.d.ts +157 -0
- package/dist/features/pull-requests/schemas.js +337 -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 +60 -0
- package/dist/features/pull-requests/tool-definitions.js.map +1 -0
- package/dist/features/pull-requests/types.d.ts +118 -0
- package/dist/features/pull-requests/types.js +3 -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 +250 -0
- package/dist/features/pull-requests/update-pull-request/feature.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 +18 -0
- package/dist/features/pull-requests/update-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.d.ts +14 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.js +87 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.js +18 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.js.map +1 -0
- package/dist/features/repositories/__test__/test-helpers.d.ts +13 -0
- package/dist/features/repositories/__test__/test-helpers.js +35 -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 +33 -0
- package/dist/features/repositories/create-branch/feature.js.map +1 -0
- package/dist/features/repositories/create-branch/index.d.ts +1 -0
- package/dist/features/repositories/create-branch/index.js +18 -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 +122 -0
- package/dist/features/repositories/create-commit/feature.js.map +1 -0
- package/dist/features/repositories/create-commit/index.d.ts +1 -0
- package/dist/features/repositories/create-commit/index.js +18 -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 +303 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.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 +19 -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 +6 -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 +96 -0
- package/dist/features/repositories/get-file-content/feature.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 +19 -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 +6 -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 +30 -0
- package/dist/features/repositories/get-repository/feature.js.map +1 -0
- package/dist/features/repositories/get-repository/index.d.ts +2 -0
- package/dist/features/repositories/get-repository/index.js +19 -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 +6 -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 +67 -0
- package/dist/features/repositories/get-repository-details/feature.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 +19 -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 +6 -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 +65 -0
- package/dist/features/repositories/get-repository-tree/feature.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 +18 -0
- package/dist/features/repositories/get-repository-tree/index.js.map +1 -0
- package/dist/features/repositories/index.d.ts +23 -0
- package/dist/features/repositories/index.js +207 -0
- package/dist/features/repositories/index.js.map +1 -0
- package/dist/features/repositories/list-branches/feature.d.ts +14 -0
- package/dist/features/repositories/list-branches/feature.js +56 -0
- package/dist/features/repositories/list-branches/feature.js.map +1 -0
- package/dist/features/repositories/list-branches/index.d.ts +2 -0
- package/dist/features/repositories/list-branches/index.js +19 -0
- package/dist/features/repositories/list-branches/index.js.map +1 -0
- package/dist/features/repositories/list-branches/schema.d.ts +8 -0
- package/dist/features/repositories/list-branches/schema.js +28 -0
- package/dist/features/repositories/list-branches/schema.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.d.ts +6 -0
- package/dist/features/repositories/list-commits/feature.js +75 -0
- package/dist/features/repositories/list-commits/feature.js.map +1 -0
- package/dist/features/repositories/list-commits/index.d.ts +1 -0
- package/dist/features/repositories/list-commits/index.js +18 -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 +25 -0
- package/dist/features/repositories/list-repositories/feature.js.map +1 -0
- package/dist/features/repositories/list-repositories/index.d.ts +2 -0
- package/dist/features/repositories/list-repositories/index.js +19 -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 +6 -0
- package/dist/features/repositories/list-repositories/schema.js.map +1 -0
- package/dist/features/repositories/list-tags/feature.d.ts +13 -0
- package/dist/features/repositories/list-tags/feature.js +52 -0
- package/dist/features/repositories/list-tags/feature.js.map +1 -0
- package/dist/features/repositories/list-tags/index.d.ts +2 -0
- package/dist/features/repositories/list-tags/index.js +19 -0
- package/dist/features/repositories/list-tags/index.js.map +1 -0
- package/dist/features/repositories/list-tags/schema.d.ts +8 -0
- package/dist/features/repositories/list-tags/schema.js +28 -0
- package/dist/features/repositories/list-tags/schema.js.map +1 -0
- package/dist/features/repositories/schemas.d.ts +101 -0
- package/dist/features/repositories/schemas.js +306 -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 +106 -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 +3 -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 +65 -0
- package/dist/features/search/index.js.map +1 -0
- package/dist/features/search/schemas.d.ts +58 -0
- package/dist/features/search/schemas.js +159 -0
- package/dist/features/search/schemas.js.map +1 -0
- package/dist/features/search/search-code/feature.d.ts +10 -0
- package/dist/features/search/search-code/feature.js +178 -0
- package/dist/features/search/search-code/feature.js.map +1 -0
- package/dist/features/search/search-code/index.d.ts +2 -0
- package/dist/features/search/search-code/index.js +19 -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 +133 -0
- package/dist/features/search/search-wiki/feature.js.map +1 -0
- package/dist/features/search/search-wiki/index.d.ts +1 -0
- package/dist/features/search/search-wiki/index.js +18 -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 +119 -0
- package/dist/features/search/search-work-items/feature.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 +18 -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 +26 -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 +3 -0
- package/dist/features/search/types.js.map +1 -0
- package/dist/features/service-connections/feature.d.ts +21 -0
- package/dist/features/service-connections/feature.js +51 -0
- package/dist/features/service-connections/feature.js.map +1 -0
- package/dist/features/service-connections/index.d.ts +10 -0
- package/dist/features/service-connections/index.js +42 -0
- package/dist/features/service-connections/index.js.map +1 -0
- package/dist/features/service-connections/schema.d.ts +8 -0
- package/dist/features/service-connections/schema.js +28 -0
- package/dist/features/service-connections/schema.js.map +1 -0
- package/dist/features/users/get-me/feature.d.ts +12 -0
- package/dist/features/users/get-me/feature.js +96 -0
- package/dist/features/users/get-me/feature.js.map +1 -0
- package/dist/features/users/get-me/index.d.ts +2 -0
- package/dist/features/users/get-me/index.js +19 -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 +6 -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 +52 -0
- package/dist/features/users/index.js.map +1 -0
- package/dist/features/users/schemas.d.ts +5 -0
- package/dist/features/users/schemas.js +9 -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 +16 -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 +3 -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 +56 -0
- package/dist/features/wikis/create-wiki/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki/index.js +9 -0
- package/dist/features/wikis/create-wiki/index.js.map +1 -0
- package/dist/features/wikis/create-wiki/schema.d.ts +25 -0
- package/dist/features/wikis/create-wiki/schema.js +60 -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 +95 -0
- package/dist/features/wikis/create-wiki-page/feature.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 +8 -0
- package/dist/features/wikis/create-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/schema.d.ts +12 -0
- package/dist/features/wikis/create-wiki-page/schema.js +36 -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 +68 -0
- package/dist/features/wikis/get-wiki-page/feature.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 +8 -0
- package/dist/features/wikis/get-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/schema.d.ts +10 -0
- package/dist/features/wikis/get-wiki-page/schema.js +23 -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 +37 -0
- package/dist/features/wikis/get-wikis/feature.js.map +1 -0
- package/dist/features/wikis/get-wikis/index.d.ts +2 -0
- package/dist/features/wikis/get-wikis/index.js +8 -0
- package/dist/features/wikis/get-wikis/index.js.map +1 -0
- package/dist/features/wikis/get-wikis/schema.d.ts +8 -0
- package/dist/features/wikis/get-wikis/schema.js +21 -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 +141 -0
- package/dist/features/wikis/index.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 +79 -0
- package/dist/features/wikis/list-wiki-pages/feature.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 +8 -0
- package/dist/features/wikis/list-wiki-pages/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/schema.d.ts +10 -0
- package/dist/features/wikis/list-wiki-pages/schema.js +22 -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 +46 -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 +63 -0
- package/dist/features/wikis/update-wiki-page/feature.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 +8 -0
- package/dist/features/wikis/update-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/schema.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/schema.js +32 -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 +28 -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 +35 -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 +39 -0
- package/dist/features/work-items/__test__/test-utils.js.map +1 -0
- package/dist/features/work-items/attachment-schemas.d.ts +24 -0
- package/dist/features/work-items/attachment-schemas.js +46 -0
- package/dist/features/work-items/attachment-schemas.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 +107 -0
- package/dist/features/work-items/create-work-item/feature.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 +19 -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 +6 -0
- package/dist/features/work-items/create-work-item/schema.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/feature.d.ts +11 -0
- package/dist/features/work-items/create-work-item-attachment/feature.js +107 -0
- package/dist/features/work-items/create-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/create-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/create-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.d.ts +10 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.js +51 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/delete-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/delete-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/delete-work-item-attachment/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 +69 -0
- package/dist/features/work-items/get-work-item/feature.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 +19 -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 +6 -0
- package/dist/features/work-items/get-work-item/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/feature.d.ts +10 -0
- package/dist/features/work-items/get-work-item-attachment/feature.js +108 -0
- package/dist/features/work-items/get-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/get-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/get-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/feature.d.ts +10 -0
- package/dist/features/work-items/get-work-item-comments/feature.js +78 -0
- package/dist/features/work-items/get-work-item-comments/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item-comments/index.js +19 -0
- package/dist/features/work-items/get-work-item-comments/index.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item-comments/schema.js +6 -0
- package/dist/features/work-items/get-work-item-comments/schema.js.map +1 -0
- package/dist/features/work-items/index.d.ts +21 -0
- package/dist/features/work-items/index.js +181 -0
- package/dist/features/work-items/index.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 +92 -0
- package/dist/features/work-items/list-work-items/feature.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 +19 -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 +6 -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 +91 -0
- package/dist/features/work-items/manage-work-item-link/feature.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 +8 -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 +6 -0
- package/dist/features/work-items/manage-work-item-link/schema.js.map +1 -0
- package/dist/features/work-items/schemas.d.ts +99 -0
- package/dist/features/work-items/schemas.js +181 -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 +56 -0
- package/dist/features/work-items/tool-definitions.js.map +1 -0
- package/dist/features/work-items/types.d.ts +87 -0
- package/dist/features/work-items/types.js +3 -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 +155 -0
- package/dist/features/work-items/update-work-item/feature.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 +19 -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 +6 -0
- package/dist/features/work-items/update-work-item/schema.js.map +1 -0
- package/dist/http-server.d.ts +22 -0
- package/dist/http-server.js +137 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +138 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +379 -0
- package/dist/server.js.map +1 -0
- package/dist/shared/api/client.d.ts +91 -0
- package/dist/shared/api/client.js +242 -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 +18 -0
- package/dist/shared/api/index.js.map +1 -0
- package/dist/shared/auth/auth-factory.d.ts +53 -0
- package/dist/shared/auth/auth-factory.js +194 -0
- package/dist/shared/auth/auth-factory.js.map +1 -0
- package/dist/shared/auth/client-factory.d.ts +109 -0
- package/dist/shared/auth/client-factory.js +272 -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 +18 -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 +120 -0
- package/dist/shared/azure-devops-url.js.map +1 -0
- package/dist/shared/config/index.d.ts +1 -0
- package/dist/shared/config/index.js +18 -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 +8 -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 +87 -0
- package/dist/shared/enums/index.js.map +1 -0
- package/dist/shared/errors/azure-devops-errors.d.ts +107 -0
- package/dist/shared/errors/azure-devops-errors.js +161 -0
- package/dist/shared/errors/azure-devops-errors.js.map +1 -0
- package/dist/shared/errors/handle-request-error.d.ts +32 -0
- package/dist/shared/errors/handle-request-error.js +121 -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 +18 -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 +57 -0
- package/dist/shared/test/test-helpers.js.map +1 -0
- package/dist/shared/test/text-content.d.ts +10 -0
- package/dist/shared/test/text-content.js +20 -0
- package/dist/shared/test/text-content.js.map +1 -0
- package/dist/shared/types/config.d.ts +27 -0
- package/dist/shared/types/config.js +3 -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 +18 -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 +3 -0
- package/dist/shared/types/request-handler.js.map +1 -0
- package/dist/shared/types/tool-definition.d.ts +9 -0
- package/dist/shared/types/tool-definition.js +3 -0
- package/dist/shared/types/tool-definition.js.map +1 -0
- package/dist/shared/utils/to-json-schema.d.ts +6 -0
- package/dist/shared/utils/to-json-schema.js +12 -0
- package/dist/shared/utils/to-json-schema.js.map +1 -0
- package/dist/utils/environment.d.ts +21 -0
- package/dist/utils/environment.js +58 -0
- package/dist/utils/environment.js.map +1 -0
- package/docs/SOLUTION_SUMMARY.md +145 -0
- package/docs/authentication.md +293 -0
- package/docs/azure-identity-authentication.md +187 -0
- package/docs/ci-setup.md +61 -0
- package/docs/docker.md +135 -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 +76 -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 +1110 -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 +244 -0
- package/package.json +125 -4
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AzureDevOpsClient = void 0;
|
|
4
|
+
const errors_1 = require("../errors");
|
|
5
|
+
const auth_factory_1 = require("./auth-factory");
|
|
6
|
+
/**
|
|
7
|
+
* Azure DevOps Client
|
|
8
|
+
*
|
|
9
|
+
* Provides access to Azure DevOps APIs using the configured authentication method
|
|
10
|
+
*/
|
|
11
|
+
class AzureDevOpsClient {
|
|
12
|
+
config;
|
|
13
|
+
clientPromise = null;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new Azure DevOps client
|
|
16
|
+
*
|
|
17
|
+
* @param config Authentication configuration
|
|
18
|
+
*/
|
|
19
|
+
constructor(config) {
|
|
20
|
+
this.config = config;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get the authenticated Azure DevOps client
|
|
24
|
+
*
|
|
25
|
+
* @returns The authenticated WebApi client
|
|
26
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
27
|
+
*/
|
|
28
|
+
async getClient() {
|
|
29
|
+
if (!this.clientPromise) {
|
|
30
|
+
this.clientPromise = (async () => {
|
|
31
|
+
try {
|
|
32
|
+
return await (0, auth_factory_1.createAuthClient)(this.config);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
36
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
37
|
+
throw error;
|
|
38
|
+
}
|
|
39
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
40
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
41
|
+
? `Authentication failed: ${error.message}`
|
|
42
|
+
: 'Authentication failed: Unknown error');
|
|
43
|
+
}
|
|
44
|
+
})();
|
|
45
|
+
}
|
|
46
|
+
return this.clientPromise;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get the underlying WebApi client
|
|
50
|
+
*
|
|
51
|
+
* @returns The authenticated WebApi client
|
|
52
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
53
|
+
*/
|
|
54
|
+
async getWebApiClient() {
|
|
55
|
+
return this.getClient();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Check if the client is authenticated
|
|
59
|
+
*
|
|
60
|
+
* @returns True if the client is authenticated
|
|
61
|
+
*/
|
|
62
|
+
async isAuthenticated() {
|
|
63
|
+
try {
|
|
64
|
+
const client = await this.getClient();
|
|
65
|
+
return !!client;
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
// Any error means we're not authenticated
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get the Core API
|
|
74
|
+
*
|
|
75
|
+
* @returns The Core API client
|
|
76
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
77
|
+
*/
|
|
78
|
+
async getCoreApi() {
|
|
79
|
+
try {
|
|
80
|
+
const client = await this.getClient();
|
|
81
|
+
return await client.getCoreApi();
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
85
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
89
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
90
|
+
? `Failed to get Core API: ${error.message}`
|
|
91
|
+
: 'Failed to get Core API: Unknown error');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get the Git API
|
|
96
|
+
*
|
|
97
|
+
* @returns The Git API client
|
|
98
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
99
|
+
*/
|
|
100
|
+
async getGitApi() {
|
|
101
|
+
try {
|
|
102
|
+
const client = await this.getClient();
|
|
103
|
+
return await client.getGitApi();
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
107
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
110
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
111
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
112
|
+
? `Failed to get Git API: ${error.message}`
|
|
113
|
+
: 'Failed to get Git API: Unknown error');
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get the Work Item Tracking API
|
|
118
|
+
*
|
|
119
|
+
* @returns The Work Item Tracking API client
|
|
120
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
121
|
+
*/
|
|
122
|
+
async getWorkItemTrackingApi() {
|
|
123
|
+
try {
|
|
124
|
+
const client = await this.getClient();
|
|
125
|
+
return await client.getWorkItemTrackingApi();
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
129
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
130
|
+
throw error;
|
|
131
|
+
}
|
|
132
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
133
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
134
|
+
? `Failed to get Work Item Tracking API: ${error.message}`
|
|
135
|
+
: 'Failed to get Work Item Tracking API: Unknown error');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Get the Build API
|
|
140
|
+
*
|
|
141
|
+
* @returns The Build API client
|
|
142
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
143
|
+
*/
|
|
144
|
+
async getBuildApi() {
|
|
145
|
+
try {
|
|
146
|
+
const client = await this.getClient();
|
|
147
|
+
return await client.getBuildApi();
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
151
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
152
|
+
throw error;
|
|
153
|
+
}
|
|
154
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
155
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
156
|
+
? `Failed to get Build API: ${error.message}`
|
|
157
|
+
: 'Failed to get Build API: Unknown error');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Get the Test API
|
|
162
|
+
*
|
|
163
|
+
* @returns The Test API client
|
|
164
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
165
|
+
*/
|
|
166
|
+
async getTestApi() {
|
|
167
|
+
try {
|
|
168
|
+
const client = await this.getClient();
|
|
169
|
+
return await client.getTestApi();
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
173
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
174
|
+
throw error;
|
|
175
|
+
}
|
|
176
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
177
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
178
|
+
? `Failed to get Test API: ${error.message}`
|
|
179
|
+
: 'Failed to get Test API: Unknown error');
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Get the Release API
|
|
184
|
+
*
|
|
185
|
+
* @returns The Release API client
|
|
186
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
187
|
+
*/
|
|
188
|
+
async getReleaseApi() {
|
|
189
|
+
try {
|
|
190
|
+
const client = await this.getClient();
|
|
191
|
+
return await client.getReleaseApi();
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
195
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
198
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
199
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
200
|
+
? `Failed to get Release API: ${error.message}`
|
|
201
|
+
: 'Failed to get Release API: Unknown error');
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Get the Task Agent API
|
|
206
|
+
*
|
|
207
|
+
* @returns The Task Agent API client
|
|
208
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
209
|
+
*/
|
|
210
|
+
async getTaskAgentApi() {
|
|
211
|
+
try {
|
|
212
|
+
const client = await this.getClient();
|
|
213
|
+
return await client.getTaskAgentApi();
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
217
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
218
|
+
throw error;
|
|
219
|
+
}
|
|
220
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
221
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
222
|
+
? `Failed to get Task Agent API: ${error.message}`
|
|
223
|
+
: 'Failed to get Task Agent API: Unknown error');
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Get the Task API
|
|
228
|
+
*
|
|
229
|
+
* @returns The Task API client
|
|
230
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
231
|
+
*/
|
|
232
|
+
async getTaskApi() {
|
|
233
|
+
try {
|
|
234
|
+
const client = await this.getClient();
|
|
235
|
+
return await client.getTaskApi();
|
|
236
|
+
}
|
|
237
|
+
catch (error) {
|
|
238
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
239
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
240
|
+
throw error;
|
|
241
|
+
}
|
|
242
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
243
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
244
|
+
? `Failed to get Task API: ${error.message}`
|
|
245
|
+
: 'Failed to get Task API: Unknown error');
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Get the Profile API
|
|
250
|
+
*
|
|
251
|
+
* @returns The Profile API client
|
|
252
|
+
* @throws {AzureDevOpsAuthenticationError} If authentication fails
|
|
253
|
+
*/
|
|
254
|
+
async getProfileApi() {
|
|
255
|
+
try {
|
|
256
|
+
const client = await this.getClient();
|
|
257
|
+
return await client.getProfileApi();
|
|
258
|
+
}
|
|
259
|
+
catch (error) {
|
|
260
|
+
// If it's already an AzureDevOpsError, rethrow it
|
|
261
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
262
|
+
throw error;
|
|
263
|
+
}
|
|
264
|
+
// Otherwise, wrap it in an AzureDevOpsAuthenticationError
|
|
265
|
+
throw new errors_1.AzureDevOpsAuthenticationError(error instanceof Error
|
|
266
|
+
? `Failed to get Profile API: ${error.message}`
|
|
267
|
+
: 'Failed to get Profile API: Unknown error');
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
exports.AzureDevOpsClient = AzureDevOpsClient;
|
|
272
|
+
//# sourceMappingURL=client-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-factory.js","sourceRoot":"","sources":["../../../src/shared/auth/client-factory.ts"],"names":[],"mappings":";;;AAUA,sCAA6E;AAC7E,iDAA8D;AAE9D;;;;GAIG;AACH;IACU,MAAM,CAAa;IACnB,aAAa,GAA2B,IAAI,CAAC;IAErD;;;;OAIG;IACH,YAAY,MAAkB;QAC5B,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,OAAO,MAAM,IAAA,+BAAgB,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC7C,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,kDAAkD;oBAClD,IAAI,KAAK,YAAY,yBAAgB,EAAE,CAAC;wBACtC,MAAM,KA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CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authentication module for Azure DevOps
|
|
3
|
+
*
|
|
4
|
+
* This module provides authentication functionality for Azure DevOps API.
|
|
5
|
+
* It supports multiple authentication methods:
|
|
6
|
+
* - Personal Access Token (PAT)
|
|
7
|
+
* - Azure Identity (DefaultAzureCredential)
|
|
8
|
+
* - Azure CLI (AzureCliCredential)
|
|
9
|
+
*/
|
|
10
|
+
export { AuthenticationMethod, AuthConfig, createAuthClient, } from './auth-factory';
|
|
11
|
+
export { AzureDevOpsClient } from './client-factory';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Authentication module for Azure DevOps
|
|
4
|
+
*
|
|
5
|
+
* This module provides authentication functionality for Azure DevOps API.
|
|
6
|
+
* It supports multiple authentication methods:
|
|
7
|
+
* - Personal Access Token (PAT)
|
|
8
|
+
* - Azure Identity (DefaultAzureCredential)
|
|
9
|
+
* - Azure CLI (AzureCliCredential)
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AzureDevOpsClient = exports.createAuthClient = exports.AuthenticationMethod = void 0;
|
|
13
|
+
var auth_factory_1 = require("./auth-factory");
|
|
14
|
+
Object.defineProperty(exports, "AuthenticationMethod", { enumerable: true, get: function () { return auth_factory_1.AuthenticationMethod; } });
|
|
15
|
+
Object.defineProperty(exports, "createAuthClient", { enumerable: true, get: function () { return auth_factory_1.createAuthClient; } });
|
|
16
|
+
var client_factory_1 = require("./client-factory");
|
|
17
|
+
Object.defineProperty(exports, "AzureDevOpsClient", { enumerable: true, get: function () { return client_factory_1.AzureDevOpsClient; } });
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/auth/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,+CAIwB;AAHtB,oHAAA,oBAAoB,OAAA;AAEpB,gHAAA,gBAAgB,OAAA;AAElB,mDAAqD;AAA5C,mHAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type AzureDevOpsUrlType = 'services' | 'server';
|
|
2
|
+
export interface AzureDevOpsBaseUrls {
|
|
3
|
+
type: AzureDevOpsUrlType;
|
|
4
|
+
organization?: string;
|
|
5
|
+
collection?: string;
|
|
6
|
+
instanceBaseUrl?: string;
|
|
7
|
+
coreBaseUrl: string;
|
|
8
|
+
searchBaseUrl: string;
|
|
9
|
+
projectFromUrl?: string;
|
|
10
|
+
}
|
|
11
|
+
interface AzureDevOpsUrlOptions {
|
|
12
|
+
organizationId?: string;
|
|
13
|
+
projectId?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function resolveAzureDevOpsBaseUrls(serverUrl: string, options?: AzureDevOpsUrlOptions): AzureDevOpsBaseUrls;
|
|
16
|
+
export declare function isAzureDevOpsServicesUrl(serverUrl: string): boolean;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveAzureDevOpsBaseUrls = resolveAzureDevOpsBaseUrls;
|
|
4
|
+
exports.isAzureDevOpsServicesUrl = isAzureDevOpsServicesUrl;
|
|
5
|
+
const errors_1 = require("./errors");
|
|
6
|
+
const DEV_AZURE_HOST = 'dev.azure.com';
|
|
7
|
+
const SEARCH_HOST = 'almsearch.dev.azure.com';
|
|
8
|
+
const VSTS_HOST_SUFFIX = '.visualstudio.com';
|
|
9
|
+
function resolveAzureDevOpsBaseUrls(serverUrl, options = {}) {
|
|
10
|
+
const url = parseUrl(serverUrl);
|
|
11
|
+
const hostname = url.hostname.toLowerCase();
|
|
12
|
+
if (isServicesHost(hostname)) {
|
|
13
|
+
const organization = options.organizationId ?? extractServicesOrganization(url);
|
|
14
|
+
if (!organization) {
|
|
15
|
+
throw new errors_1.AzureDevOpsValidationError('Could not extract organization from Azure DevOps Services URL');
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
type: 'services',
|
|
19
|
+
organization,
|
|
20
|
+
coreBaseUrl: `https://${DEV_AZURE_HOST}/${organization}`,
|
|
21
|
+
searchBaseUrl: `https://${SEARCH_HOST}/${organization}`,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const serverInfo = extractServerInfo(url, options.projectId);
|
|
25
|
+
const collection = serverInfo.collection ?? options.organizationId;
|
|
26
|
+
if (!collection) {
|
|
27
|
+
throw new errors_1.AzureDevOpsValidationError('Azure DevOps Server URL must include a collection');
|
|
28
|
+
}
|
|
29
|
+
const instanceBaseUrl = buildBaseUrl(url.origin, serverInfo.instanceSegments);
|
|
30
|
+
const coreBaseUrl = joinUrl(instanceBaseUrl, collection);
|
|
31
|
+
return {
|
|
32
|
+
type: 'server',
|
|
33
|
+
collection,
|
|
34
|
+
instanceBaseUrl,
|
|
35
|
+
coreBaseUrl,
|
|
36
|
+
searchBaseUrl: coreBaseUrl,
|
|
37
|
+
projectFromUrl: serverInfo.projectFromUrl,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function isAzureDevOpsServicesUrl(serverUrl) {
|
|
41
|
+
try {
|
|
42
|
+
const url = new URL(serverUrl);
|
|
43
|
+
return isServicesHost(url.hostname.toLowerCase());
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function parseUrl(input) {
|
|
50
|
+
try {
|
|
51
|
+
const url = new URL(input);
|
|
52
|
+
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
|
|
53
|
+
throw new errors_1.AzureDevOpsValidationError('Organization URL must start with http:// or https://');
|
|
54
|
+
}
|
|
55
|
+
return url;
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
if (error instanceof errors_1.AzureDevOpsValidationError) {
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
throw new errors_1.AzureDevOpsValidationError('Organization URL must include a valid http or https scheme');
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function isServicesHost(hostname) {
|
|
65
|
+
return hostname === DEV_AZURE_HOST || hostname.endsWith(VSTS_HOST_SUFFIX);
|
|
66
|
+
}
|
|
67
|
+
function extractServicesOrganization(url) {
|
|
68
|
+
if (url.hostname.toLowerCase() === DEV_AZURE_HOST) {
|
|
69
|
+
const segments = getPathSegments(url);
|
|
70
|
+
return segments[0] ?? '';
|
|
71
|
+
}
|
|
72
|
+
const hostParts = url.hostname.split('.');
|
|
73
|
+
return hostParts[0] ?? '';
|
|
74
|
+
}
|
|
75
|
+
function getPathSegments(url) {
|
|
76
|
+
return url.pathname
|
|
77
|
+
.split('/')
|
|
78
|
+
.filter(Boolean)
|
|
79
|
+
.map((segment) => decodeURIComponent(segment));
|
|
80
|
+
}
|
|
81
|
+
function extractServerInfo(url, projectId) {
|
|
82
|
+
const segments = getPathSegments(url);
|
|
83
|
+
const normalizedProject = projectId?.toLowerCase();
|
|
84
|
+
if (segments.length === 0) {
|
|
85
|
+
return { instanceSegments: [] };
|
|
86
|
+
}
|
|
87
|
+
if (segments.length === 1) {
|
|
88
|
+
const [segment] = segments;
|
|
89
|
+
if (segment.toLowerCase() === 'tfs') {
|
|
90
|
+
return { instanceSegments: [segment] };
|
|
91
|
+
}
|
|
92
|
+
return { instanceSegments: [], collection: segment };
|
|
93
|
+
}
|
|
94
|
+
const lastSegment = segments[segments.length - 1];
|
|
95
|
+
if (normalizedProject && lastSegment.toLowerCase() === normalizedProject) {
|
|
96
|
+
const collection = segments[segments.length - 2];
|
|
97
|
+
const instanceSegments = segments.slice(0, -2);
|
|
98
|
+
return {
|
|
99
|
+
instanceSegments,
|
|
100
|
+
collection,
|
|
101
|
+
projectFromUrl: lastSegment,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
instanceSegments: segments.slice(0, -1),
|
|
106
|
+
collection: lastSegment,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function buildBaseUrl(origin, segments) {
|
|
110
|
+
if (segments.length === 0) {
|
|
111
|
+
return origin.replace(/\/+$/, '');
|
|
112
|
+
}
|
|
113
|
+
const url = new URL(origin);
|
|
114
|
+
url.pathname = `/${segments.join('/')}`;
|
|
115
|
+
return url.toString().replace(/\/+$/, '');
|
|
116
|
+
}
|
|
117
|
+
function joinUrl(base, segment) {
|
|
118
|
+
return `${base.replace(/\/+$/, '')}/${segment}`;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=azure-devops-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"azure-devops-url.js","sourceRoot":"","sources":["../../src/shared/azure-devops-url.ts"],"names":[],"mappings":";;;;AAAA,qCAAsD;AAmBtD,MAAM,cAAc,GAAG,eAAe,CAAC;AACvC,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAC9C,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAE7C,oCACE,SAAiB,EACjB,OAAO,GAA0B,EAAE;IAEnC,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IAE5C,IAAI,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,MAAM,YAAY,GAChB,OAAO,CAAC,cAAc,IAAI,2BAA2B,CAAC,GAAG,CAAC,CAAC;QAE7D,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,mCAA0B,CAClC,+DAA+D,CAChE,CAAC;QACJ,CAAC;QAED,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,YAAY;YACZ,WAAW,EAAE,WAAW,cAAc,IAAI,YAAY,EAAE;YACxD,aAAa,EAAE,WA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C,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,OAAO,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './version';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./version"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/shared/config/version.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CommentThreadStatus enum mappings
|
|
3
|
+
*/
|
|
4
|
+
export declare const commentThreadStatusMapper: {
|
|
5
|
+
toEnum: (value: string) => number | undefined;
|
|
6
|
+
toString: (value: number) => string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* CommentType enum mappings
|
|
10
|
+
*/
|
|
11
|
+
export declare const commentTypeMapper: {
|
|
12
|
+
toEnum: (value: string) => number | undefined;
|
|
13
|
+
toString: (value: number) => string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* PullRequestStatus enum mappings
|
|
17
|
+
*/
|
|
18
|
+
export declare const pullRequestStatusMapper: {
|
|
19
|
+
toEnum: (value: string) => number | undefined;
|
|
20
|
+
toString: (value: number) => string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* GitVersionType enum mappings
|
|
24
|
+
*/
|
|
25
|
+
export declare const gitVersionTypeMapper: {
|
|
26
|
+
toEnum: (value: string) => number | undefined;
|
|
27
|
+
toString: (value: number) => string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Transform comment thread status from numeric to string
|
|
31
|
+
*/
|
|
32
|
+
export declare function transformCommentThreadStatus(status?: number): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Transform comment type from numeric to string
|
|
35
|
+
*/
|
|
36
|
+
export declare function transformCommentType(type?: number): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Transform pull request status from numeric to string
|
|
39
|
+
*/
|
|
40
|
+
export declare function transformPullRequestStatus(status?: number): string | undefined;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gitVersionTypeMapper = exports.pullRequestStatusMapper = exports.commentTypeMapper = exports.commentThreadStatusMapper = void 0;
|
|
4
|
+
exports.transformCommentThreadStatus = transformCommentThreadStatus;
|
|
5
|
+
exports.transformCommentType = transformCommentType;
|
|
6
|
+
exports.transformPullRequestStatus = transformPullRequestStatus;
|
|
7
|
+
const GitInterfaces_1 = require("azure-devops-node-api/interfaces/GitInterfaces");
|
|
8
|
+
const GitInterfaces_2 = require("azure-devops-node-api/interfaces/GitInterfaces");
|
|
9
|
+
/**
|
|
10
|
+
* Generic enum mapper that creates bidirectional mappings between strings and numeric enums
|
|
11
|
+
*/
|
|
12
|
+
function createEnumMapper(mappings, defaultStringValue = 'unknown') {
|
|
13
|
+
// Create reverse mapping from enum values to strings
|
|
14
|
+
const reverseMap = Object.entries(mappings).reduce((acc, [key, value]) => {
|
|
15
|
+
acc[value] = key;
|
|
16
|
+
return acc;
|
|
17
|
+
}, {});
|
|
18
|
+
return {
|
|
19
|
+
toEnum: (value) => {
|
|
20
|
+
const lowerValue = value.toLowerCase();
|
|
21
|
+
return mappings[lowerValue];
|
|
22
|
+
},
|
|
23
|
+
toString: (value) => {
|
|
24
|
+
return reverseMap[value] ?? defaultStringValue;
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* CommentThreadStatus enum mappings
|
|
30
|
+
*/
|
|
31
|
+
exports.commentThreadStatusMapper = createEnumMapper({
|
|
32
|
+
unknown: GitInterfaces_1.CommentThreadStatus.Unknown,
|
|
33
|
+
active: GitInterfaces_1.CommentThreadStatus.Active,
|
|
34
|
+
fixed: GitInterfaces_1.CommentThreadStatus.Fixed,
|
|
35
|
+
wontfix: GitInterfaces_1.CommentThreadStatus.WontFix,
|
|
36
|
+
closed: GitInterfaces_1.CommentThreadStatus.Closed,
|
|
37
|
+
bydesign: GitInterfaces_1.CommentThreadStatus.ByDesign,
|
|
38
|
+
pending: GitInterfaces_1.CommentThreadStatus.Pending,
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* CommentType enum mappings
|
|
42
|
+
*/
|
|
43
|
+
exports.commentTypeMapper = createEnumMapper({
|
|
44
|
+
unknown: GitInterfaces_1.CommentType.Unknown,
|
|
45
|
+
text: GitInterfaces_1.CommentType.Text,
|
|
46
|
+
codechange: GitInterfaces_1.CommentType.CodeChange,
|
|
47
|
+
system: GitInterfaces_1.CommentType.System,
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* PullRequestStatus enum mappings
|
|
51
|
+
*/
|
|
52
|
+
exports.pullRequestStatusMapper = createEnumMapper({
|
|
53
|
+
active: GitInterfaces_2.PullRequestStatus.Active,
|
|
54
|
+
abandoned: GitInterfaces_2.PullRequestStatus.Abandoned,
|
|
55
|
+
completed: GitInterfaces_2.PullRequestStatus.Completed,
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* GitVersionType enum mappings
|
|
59
|
+
*/
|
|
60
|
+
exports.gitVersionTypeMapper = createEnumMapper({
|
|
61
|
+
branch: GitInterfaces_1.GitVersionType.Branch,
|
|
62
|
+
commit: GitInterfaces_1.GitVersionType.Commit,
|
|
63
|
+
tag: GitInterfaces_1.GitVersionType.Tag,
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* Transform comment thread status from numeric to string
|
|
67
|
+
*/
|
|
68
|
+
function transformCommentThreadStatus(status) {
|
|
69
|
+
return status !== undefined
|
|
70
|
+
? exports.commentThreadStatusMapper.toString(status)
|
|
71
|
+
: undefined;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Transform comment type from numeric to string
|
|
75
|
+
*/
|
|
76
|
+
function transformCommentType(type) {
|
|
77
|
+
return type !== undefined ? exports.commentTypeMapper.toString(type) : undefined;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Transform pull request status from numeric to string
|
|
81
|
+
*/
|
|
82
|
+
function transformPullRequestStatus(status) {
|
|
83
|
+
return status !== undefined
|
|
84
|
+
? exports.pullRequestStatusMapper.toString(status)
|
|
85
|
+
: undefined;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/enums/index.ts"],"names":[],"mappings":";;;;;;AAAA,kFAIwD;AACxD,kFAAmF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