@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,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPipeline = getPipeline;
|
|
4
|
+
const errors_1 = require("../../../shared/errors");
|
|
5
|
+
/**
|
|
6
|
+
* Get a specific pipeline by ID
|
|
7
|
+
*
|
|
8
|
+
* @param connection The Azure DevOps WebApi connection
|
|
9
|
+
* @param options Options for getting a pipeline
|
|
10
|
+
* @returns Pipeline details
|
|
11
|
+
*/
|
|
12
|
+
async function getPipeline(connection, options) {
|
|
13
|
+
try {
|
|
14
|
+
const pipelinesApi = await connection.getPipelinesApi();
|
|
15
|
+
const { projectId, pipelineId, pipelineVersion } = options;
|
|
16
|
+
// Call the pipelines API to get the pipeline
|
|
17
|
+
const pipeline = await pipelinesApi.getPipeline(projectId, pipelineId, pipelineVersion);
|
|
18
|
+
// If pipeline not found, API returns null instead of throwing error
|
|
19
|
+
if (pipeline === null) {
|
|
20
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Pipeline not found with ID: ${pipelineId}`);
|
|
21
|
+
}
|
|
22
|
+
return pipeline;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
// Handle specific error types
|
|
26
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
// Check for specific error types and convert to appropriate Azure DevOps errors
|
|
30
|
+
if (error instanceof Error) {
|
|
31
|
+
if (error.message.includes('Authentication') ||
|
|
32
|
+
error.message.includes('Unauthorized') ||
|
|
33
|
+
error.message.includes('401')) {
|
|
34
|
+
throw new errors_1.AzureDevOpsAuthenticationError(`Failed to authenticate: ${error.message}`);
|
|
35
|
+
}
|
|
36
|
+
if (error.message.includes('not found') ||
|
|
37
|
+
error.message.includes('does not exist') ||
|
|
38
|
+
error.message.includes('404')) {
|
|
39
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Pipeline or project not found: ${error.message}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
// Otherwise, wrap it in a generic error
|
|
43
|
+
throw new errors_1.AzureDevOpsError(`Failed to get pipeline: ${error instanceof Error ? error.message : String(error)}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src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kC,KAAK,CAAC,OAAO,EAAE,CAClD,CAAC;YACJ,CAAC;QACH,CAAC;QAED,wCAAwC;QACxC,MAAM,IAAI,yBAAgB,CACxB,2BAA2B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACpF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./feature"), exports);
|
|
18
|
+
__exportStar(require("./schema"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for the getPipeline function
|
|
4
|
+
*/
|
|
5
|
+
export declare const GetPipelineSchema: z.ZodObject<{
|
|
6
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
pipelineId: z.ZodNumber;
|
|
8
|
+
pipelineVersion: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPipelineSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const environment_1 = require("../../../utils/environment");
|
|
6
|
+
/**
|
|
7
|
+
* Schema for the getPipeline function
|
|
8
|
+
*/
|
|
9
|
+
exports.GetPipelineSchema = zod_1.z.object({
|
|
10
|
+
// The project containing the pipeline
|
|
11
|
+
projectId: zod_1.z
|
|
12
|
+
.string()
|
|
13
|
+
.optional()
|
|
14
|
+
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
|
|
15
|
+
// The ID of the pipeline to retrieve
|
|
16
|
+
pipelineId: zod_1.z
|
|
17
|
+
.number()
|
|
18
|
+
.int()
|
|
19
|
+
.positive()
|
|
20
|
+
.describe('The numeric ID of the pipeline to retrieve'),
|
|
21
|
+
// The version of the pipeline to retrieve
|
|
22
|
+
pipelineVersion: zod_1.z
|
|
23
|
+
.number()
|
|
24
|
+
.int()
|
|
25
|
+
.positive()
|
|
26
|
+
.optional()
|
|
27
|
+
.describe('The version of the pipeline to retrieve (latest if not specified)'),
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4DAA4D;AAE5D;;GAEG;AACU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,sCAAsC;IACtC,SAAS,EAAE,OAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2CAA2C,4BAAc,GAAG,CAAC;IACzE,qCAAqC;IACrC,UAAU,EAAE,OAAC;SACV,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,CAAC,4CAA4C,CAAC;IACzD,0CAA0C;IAC1C,eAAe,EAAE,OAAC;SACf,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACP,mEAAmE,CACpE;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPipelineLog = getPipelineLog;
|
|
4
|
+
const errors_1 = require("../../../shared/errors");
|
|
5
|
+
const environment_1 = require("../../../utils/environment");
|
|
6
|
+
const API_VERSION = environment_1.apiVersion;
|
|
7
|
+
async function getPipelineLog(connection, options) {
|
|
8
|
+
try {
|
|
9
|
+
const buildApi = await connection.getBuildApi();
|
|
10
|
+
const projectId = options.projectId ?? environment_1.defaultProject;
|
|
11
|
+
const { runId, logId, format, startLine, endLine } = options;
|
|
12
|
+
if (format === 'json') {
|
|
13
|
+
const route = `${encodeURIComponent(projectId)}/_apis/build/builds/${runId}/logs/${logId}`;
|
|
14
|
+
const baseUrl = connection.serverUrl.replace(/\/+$/, '');
|
|
15
|
+
const url = new URL(`${route}`, `${baseUrl}/`);
|
|
16
|
+
url.searchParams.set('api-version', API_VERSION);
|
|
17
|
+
url.searchParams.set('format', 'json');
|
|
18
|
+
if (typeof startLine === 'number') {
|
|
19
|
+
url.searchParams.set('startLine', startLine.toString());
|
|
20
|
+
}
|
|
21
|
+
if (typeof endLine === 'number') {
|
|
22
|
+
url.searchParams.set('endLine', endLine.toString());
|
|
23
|
+
}
|
|
24
|
+
const requestOptions = buildApi.createRequestOptions('application/json', API_VERSION);
|
|
25
|
+
const response = await buildApi.rest.get(url.toString(), requestOptions);
|
|
26
|
+
if (response.statusCode === 404 || response.result === null) {
|
|
27
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Log ${logId} not found for run ${runId} in project ${projectId}`);
|
|
28
|
+
}
|
|
29
|
+
return response.result;
|
|
30
|
+
}
|
|
31
|
+
const lines = await buildApi.getBuildLogLines(projectId, runId, logId, startLine, endLine);
|
|
32
|
+
if (!lines) {
|
|
33
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Log ${logId} not found for run ${runId} in project ${projectId}`);
|
|
34
|
+
}
|
|
35
|
+
return lines.join('\n');
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
if (error instanceof Error) {
|
|
42
|
+
const message = error.message.toLowerCase();
|
|
43
|
+
if (message.includes('authentication') ||
|
|
44
|
+
message.includes('unauthorized') ||
|
|
45
|
+
message.includes('401')) {
|
|
46
|
+
throw new errors_1.AzureDevOpsAuthenticationError(`Failed to authenticate: ${error.message}`);
|
|
47
|
+
}
|
|
48
|
+
if (message.includes('not found') ||
|
|
49
|
+
message.includes('does not exist') ||
|
|
50
|
+
message.includes('404')) {
|
|
51
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Pipeline log or project not found: ${error.message}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
throw new errors_1.AzureDevOpsError(`Failed to retrieve pipeline log: ${error instanceof Error ? error.message : String(error)}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline-log/feature.ts"],"names":[],"mappings":";;;AACA,mDAIgC;AAChC,4DAAwE;AAGxE,MAAM,WAAW,GAAG,wBAAU,CAAC;AAExB,KAA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AK,CAAC,OAAO,EAAE,CACtD,CAAC;YACJ,CAAC;QACH,CAAC;QAED,MAAM,IAAI,yBAAgB,CACxB,oCACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./feature"), exports);
|
|
18
|
+
__exportStar(require("./schema"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline-log/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GetPipelineLogSchema: z.ZodObject<{
|
|
3
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
4
|
+
runId: z.ZodNumber;
|
|
5
|
+
logId: z.ZodNumber;
|
|
6
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
7
|
+
json: "json";
|
|
8
|
+
plain: "plain";
|
|
9
|
+
}>>;
|
|
10
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
pipelineId: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPipelineLogSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const environment_1 = require("../../../utils/environment");
|
|
6
|
+
exports.GetPipelineLogSchema = zod_1.z.object({
|
|
7
|
+
projectId: zod_1.z
|
|
8
|
+
.string()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
|
|
11
|
+
runId: zod_1.z.number().int().min(1).describe('Pipeline run identifier'),
|
|
12
|
+
logId: zod_1.z
|
|
13
|
+
.number()
|
|
14
|
+
.int()
|
|
15
|
+
.min(1)
|
|
16
|
+
.describe('Log identifier from the timeline record'),
|
|
17
|
+
format: zod_1.z
|
|
18
|
+
.enum(['plain', 'json'])
|
|
19
|
+
.optional()
|
|
20
|
+
.describe('Optional format for the log contents (plain or json)'),
|
|
21
|
+
startLine: zod_1.z
|
|
22
|
+
.number()
|
|
23
|
+
.int()
|
|
24
|
+
.min(0)
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('Optional starting line number for the log segment'),
|
|
27
|
+
endLine: zod_1.z
|
|
28
|
+
.number()
|
|
29
|
+
.int()
|
|
30
|
+
.min(0)
|
|
31
|
+
.optional()
|
|
32
|
+
.describe('Optional ending line number for the log segment'),
|
|
33
|
+
pipelineId: zod_1.z
|
|
34
|
+
.number()
|
|
35
|
+
.int()
|
|
36
|
+
.min(1)
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('Optional pipeline numeric ID for reference only'),
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline-log/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4DAA4D;AAE/C,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,OAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2CAA2C,4BAAc,GAAG,CAAC;IACzE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAClE,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,yCAAyC,CAAC;IACtD,MAAM,EAAE,OAAC;SACN,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;SACvB,QAAQ,EAAE;SACV,QAAQ,CAAC,sDAAsD,CAAC;IACnE,SAAS,EAAE,OAAC;SACT,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,mDAAmD,CAAC;IAChE,OAAO,EAAE,OAAC;SACP,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,iDAAiD,CAAC;IAC9D,UAAU,EAAE,OAAC;SACV,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,iDAAiD,CAAC;CAC/D,CAAC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPipelineRun = getPipelineRun;
|
|
4
|
+
const PipelinesInterfaces_1 = require("azure-devops-node-api/interfaces/PipelinesInterfaces");
|
|
5
|
+
const errors_1 = require("../../../shared/errors");
|
|
6
|
+
const environment_1 = require("../../../utils/environment");
|
|
7
|
+
const artifacts_1 = require("../artifacts");
|
|
8
|
+
const helpers_1 = require("../helpers");
|
|
9
|
+
const API_VERSION = environment_1.apiVersion;
|
|
10
|
+
async function getPipelineRun(connection, options) {
|
|
11
|
+
try {
|
|
12
|
+
const pipelinesApi = await connection.getPipelinesApi();
|
|
13
|
+
const projectId = options.projectId ?? environment_1.defaultProject;
|
|
14
|
+
const runId = options.runId;
|
|
15
|
+
const resolvedPipelineId = await (0, helpers_1.resolvePipelineId)(connection, projectId, runId, options.pipelineId);
|
|
16
|
+
const baseUrl = connection.serverUrl.replace(/\/+$/, '');
|
|
17
|
+
const encodedProject = encodeURIComponent(projectId);
|
|
18
|
+
const requestOptions = pipelinesApi.createRequestOptions('application/json', API_VERSION);
|
|
19
|
+
const buildRunUrl = (pipelineId) => {
|
|
20
|
+
const route = typeof pipelineId === 'number'
|
|
21
|
+
? `${encodedProject}/_apis/pipelines/${pipelineId}/runs/${runId}`
|
|
22
|
+
: `${encodedProject}/_apis/pipelines/runs/${runId}`;
|
|
23
|
+
const url = new URL(`${route}`, `${baseUrl}/`);
|
|
24
|
+
url.searchParams.set('api-version', API_VERSION);
|
|
25
|
+
return url;
|
|
26
|
+
};
|
|
27
|
+
const urlsToTry = [];
|
|
28
|
+
if (typeof resolvedPipelineId === 'number') {
|
|
29
|
+
urlsToTry.push(buildRunUrl(resolvedPipelineId));
|
|
30
|
+
}
|
|
31
|
+
urlsToTry.push(buildRunUrl());
|
|
32
|
+
let response = null;
|
|
33
|
+
for (const url of urlsToTry) {
|
|
34
|
+
const attempt = await pipelinesApi.rest.get(url.toString(), requestOptions);
|
|
35
|
+
if (attempt.statusCode !== 404 && attempt.result) {
|
|
36
|
+
response = attempt;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (!response || !response.result) {
|
|
41
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Pipeline run ${runId} not found in project ${projectId}`);
|
|
42
|
+
}
|
|
43
|
+
const run = pipelinesApi.formatResponse(response.result, PipelinesInterfaces_1.TypeInfo.Run, false);
|
|
44
|
+
if (!run) {
|
|
45
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Pipeline run ${runId} not found in project ${projectId}`);
|
|
46
|
+
}
|
|
47
|
+
const artifacts = await (0, artifacts_1.fetchRunArtifacts)(connection, projectId, runId, resolvedPipelineId);
|
|
48
|
+
if (typeof options.pipelineId === 'number') {
|
|
49
|
+
const runPipelineId = (0, helpers_1.coercePipelineId)(run.pipeline?.id);
|
|
50
|
+
if (runPipelineId !== options.pipelineId) {
|
|
51
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Run ${runId} does not belong to pipeline ${options.pipelineId}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return artifacts.length > 0 ? { ...run, artifacts } : run;
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
if (error instanceof Error) {
|
|
61
|
+
const message = error.message.toLowerCase();
|
|
62
|
+
if (message.includes('authentication') ||
|
|
63
|
+
message.includes('unauthorized') ||
|
|
64
|
+
message.includes('401')) {
|
|
65
|
+
throw new errors_1.AzureDevOpsAuthenticationError(`Failed to authenticate: ${error.message}`);
|
|
66
|
+
}
|
|
67
|
+
if (message.includes('not found') ||
|
|
68
|
+
message.includes('does not exist') ||
|
|
69
|
+
message.includes('404')) {
|
|
70
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Pipeline run or project not found: ${error.message}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
throw new errors_1.AzureDevOpsError(`Failed to get pipeline run: ${error instanceof Error ? error.message : String(error)}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline-run/feature.ts"],"names":[],"mappings":";;;AACA,8FAAgF;AAChF,mDAIgC;AAChC,4DAAwE;AACxE,4CAAiD;AACjD,wCAAiE;AAGjE,MAAM,WAAW,GAAG,wBAAU,CAAC;AAExB,KAAK,yBACV,UAAkB,EAClB,OAA8B;IAE9B,IAAI,CAAC;QACH,MAAM,YAAY,GAAG,MAAM,UAAU,CAAC,eAAe,EAAE,CAAC;QACxD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,4BAAc,CAAC;QACtD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,MAAM,kBAAkB,GAAG,MAAM,IAAA,2BAAiB,EAChD,UAAU,EACV,SAAS,EACT,KAAK,EACL,OAAO,CAAC,UAAU,CACnB,CAAC;QAEF,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACzD,MAAM,cAAc,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAErD,MAAM,cAAc,GAAG,YAAY,CAAC,oBAAoB,CACtD,kBAAkB,EAClB,WAAW,CACZ,CAAC;QAEF,MAAM,WAAW,GAAG,CAAC,UAAmB,EAAE,EAAE;YAC1C,MAAM,KAAK,GACT,OAAO,UAAU,KAAK,QAAQ;gBAC5B,CAAC,CAAC,GAAG,cAAc,oBAAoB,UAAU,SAAS,KAAK,EAAE;gBACjE,CAAC,CAAC,GAAG,cAAc,yBAAyB,KAAK,EAAE,CAAC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M,IAAI,yBAAgB,CACxB,+BACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./feature"), exports);
|
|
18
|
+
__exportStar(require("./schema"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline-run/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPipelineRunSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const environment_1 = require("../../../utils/environment");
|
|
6
|
+
exports.GetPipelineRunSchema = zod_1.z.object({
|
|
7
|
+
projectId: zod_1.z
|
|
8
|
+
.string()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
|
|
11
|
+
runId: zod_1.z.number().int().min(1).describe('Pipeline run identifier'),
|
|
12
|
+
pipelineId: zod_1.z
|
|
13
|
+
.number()
|
|
14
|
+
.int()
|
|
15
|
+
.min(1)
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('Optional guard; validates the run belongs to this pipeline'),
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline-run/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4DAA4D;AAE/C,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,SAAS,EAAE,OAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2CAA2C,4BAAc,GAAG,CAAC;IACzE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAClE,UAAU,EAAE,OAAC;SACV,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,4DAA4D,CAAC;CAC1E,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { GetPipelineRunSourcesSchema } from './schema';
|
|
4
|
+
export type GetPipelineRunSourcesOptions = z.infer<typeof GetPipelineRunSourcesSchema>;
|
|
5
|
+
export interface PipelineRunResource {
|
|
6
|
+
alias: string;
|
|
7
|
+
type: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
branch?: string;
|
|
10
|
+
commitId?: string;
|
|
11
|
+
repoType?: string;
|
|
12
|
+
repositoryId?: string;
|
|
13
|
+
repositoryName?: string;
|
|
14
|
+
definitionId?: number;
|
|
15
|
+
definitionName?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface PipelineRunSources {
|
|
18
|
+
runId: number;
|
|
19
|
+
resources: PipelineRunResource[];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Returns the source repositories and their versions/branches used in a
|
|
23
|
+
* pipeline run. Azure DevOps exposes this under `resources` on the run
|
|
24
|
+
* object when expanded with `$expand=resources`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getPipelineRunSources(connection: WebApi, options: GetPipelineRunSourcesOptions): Promise<PipelineRunSources>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPipelineRunSources = getPipelineRunSources;
|
|
4
|
+
const errors_1 = require("../../../shared/errors");
|
|
5
|
+
const environment_1 = require("../../../utils/environment");
|
|
6
|
+
const API_VERSION = environment_1.apiVersion;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the source repositories and their versions/branches used in a
|
|
9
|
+
* pipeline run. Azure DevOps exposes this under `resources` on the run
|
|
10
|
+
* object when expanded with `$expand=resources`.
|
|
11
|
+
*/
|
|
12
|
+
async function getPipelineRunSources(connection, options) {
|
|
13
|
+
try {
|
|
14
|
+
const pipelinesApi = await connection.getPipelinesApi();
|
|
15
|
+
const projectId = options.projectId ?? environment_1.defaultProject;
|
|
16
|
+
const { runId } = options;
|
|
17
|
+
const baseUrl = connection.serverUrl.replace(/\/+$/, '');
|
|
18
|
+
const encodedProject = encodeURIComponent(projectId);
|
|
19
|
+
// Try pipeline-scoped URL first if we have a pipelineId
|
|
20
|
+
const urls = [];
|
|
21
|
+
if (options.pipelineId) {
|
|
22
|
+
const u1 = new URL(`${encodedProject}/_apis/pipelines/${options.pipelineId}/runs/${runId}`, `${baseUrl}/`);
|
|
23
|
+
u1.searchParams.set('api-version', API_VERSION);
|
|
24
|
+
u1.searchParams.set('$expand', 'resources');
|
|
25
|
+
urls.push(u1.toString());
|
|
26
|
+
}
|
|
27
|
+
const u2 = new URL(`${encodedProject}/_apis/pipelines/runs/${runId}`, `${baseUrl}/`);
|
|
28
|
+
u2.searchParams.set('api-version', API_VERSION);
|
|
29
|
+
u2.searchParams.set('$expand', 'resources');
|
|
30
|
+
urls.push(u2.toString());
|
|
31
|
+
const requestOptions = pipelinesApi.createRequestOptions('application/json', API_VERSION);
|
|
32
|
+
let raw = null;
|
|
33
|
+
for (const urlStr of urls) {
|
|
34
|
+
const response = await pipelinesApi.rest.get(urlStr, requestOptions);
|
|
35
|
+
if (response.statusCode !== 404 && response.result) {
|
|
36
|
+
raw = response.result;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (!raw) {
|
|
41
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Pipeline run ${runId} not found in project ${projectId}`);
|
|
42
|
+
}
|
|
43
|
+
const resources = [];
|
|
44
|
+
const rawResources = raw.resources;
|
|
45
|
+
if (rawResources && typeof rawResources === 'object') {
|
|
46
|
+
// repositories section
|
|
47
|
+
const repos = rawResources.repositories;
|
|
48
|
+
if (repos && typeof repos === 'object') {
|
|
49
|
+
for (const [alias, repo] of Object.entries(repos)) {
|
|
50
|
+
const r = repo;
|
|
51
|
+
const ref = r.refName;
|
|
52
|
+
resources.push({
|
|
53
|
+
alias,
|
|
54
|
+
type: 'repository',
|
|
55
|
+
version: r.version,
|
|
56
|
+
branch: ref ? ref.replace('refs/heads/', '') : undefined,
|
|
57
|
+
commitId: r.version,
|
|
58
|
+
repoType: r.repository
|
|
59
|
+
?.type,
|
|
60
|
+
repositoryId: r.repository
|
|
61
|
+
?.id,
|
|
62
|
+
repositoryName: r.repository?.name,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// pipelines section
|
|
67
|
+
const pipelines = rawResources.pipelines;
|
|
68
|
+
if (pipelines && typeof pipelines === 'object') {
|
|
69
|
+
for (const [alias, pipeline] of Object.entries(pipelines)) {
|
|
70
|
+
const p = pipeline;
|
|
71
|
+
resources.push({
|
|
72
|
+
alias,
|
|
73
|
+
type: 'pipeline',
|
|
74
|
+
version: p.run?.id,
|
|
75
|
+
definitionId: p.pipeline
|
|
76
|
+
?.id,
|
|
77
|
+
definitionName: p.pipeline
|
|
78
|
+
?.name,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return { runId, resources };
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
if (error instanceof Error) {
|
|
90
|
+
const message = error.message.toLowerCase();
|
|
91
|
+
if (message.includes('authentication') ||
|
|
92
|
+
message.includes('unauthorized') ||
|
|
93
|
+
message.includes('401')) {
|
|
94
|
+
throw new errors_1.AzureDevOpsAuthenticationError(`Failed to authenticate: ${error.message}`);
|
|
95
|
+
}
|
|
96
|
+
if (message.includes('not found') ||
|
|
97
|
+
message.includes('does not exist') ||
|
|
98
|
+
message.includes('404')) {
|
|
99
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Pipeline run sources not found: ${error.message}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
throw new errors_1.AzureDevOpsError(`Failed to get pipeline run sources: ${error instanceof Error ? error.message : String(error)}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline-run-sources/feature.ts"],"names":[],"mappings":";;;AACA,mDAIgC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ACvB,CAAC;gBACD,MAAM,IAAI,uCAA8B,CACtC,2BAA2B,KAAK,CAAC,OAAO,EAAE,CAC3C,CAAC;YACJ,CAAC;YACD,IACE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;gBAC7B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;gBAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EACvB,CAAC;gBACD,MAAM,IAAI,yCAAgC,CACxC,mCAAmC,KAAK,CAAC,OAAO,EAAE,CACnD,CAAC;YACJ,CAAC;QACH,CAAC;QAED,MAAM,IAAI,yBAAgB,CACxB,uCAAuC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAChG,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./feature"), exports);
|
|
18
|
+
__exportStar(require("./schema"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/pipelines/get-pipeline-run-sources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPipelineRunSourcesSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const environment_1 = require("../../../utils/environment");
|
|
6
|
+
exports.GetPipelineRunSourcesSchema = zod_1.z.object({
|
|
7
|
+
projectId: zod_1.z
|
|
8
|
+
.string()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
|
|
11
|
+
runId: zod_1.z.number().int().min(1).describe('The pipeline run ID'),
|
|
12
|
+
pipelineId: zod_1.z
|
|
13
|
+
.number()
|
|
14
|
+
.int()
|
|
15
|
+
.min(1)
|
|
16
|
+
.optional()
|
|
17
|
+
.describe('Optional pipeline ID for context'),
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=schema.js.map
|