mcp-server-azure-devops 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +265 -0
- package/dist/clients/azure-devops.d.ts +105 -0
- package/dist/clients/azure-devops.js +492 -0
- package/dist/clients/azure-devops.js.map +1 -0
- package/dist/clients/azure-devops.spec.unit.d.ts +1 -0
- package/dist/clients/azure-devops.spec.unit.js +37 -0
- package/dist/clients/azure-devops.spec.unit.js.map +1 -0
- package/dist/extension.d.ts +3 -0
- package/dist/extension.js +93 -0
- package/dist/extension.js.map +1 -0
- package/dist/features/organizations/__test__/test-helpers.d.ts +13 -0
- package/dist/features/organizations/__test__/test-helpers.js +34 -0
- package/dist/features/organizations/__test__/test-helpers.js.map +1 -0
- package/dist/features/organizations/index.d.ts +13 -0
- package/dist/features/organizations/index.js +44 -0
- package/dist/features/organizations/index.js.map +1 -0
- package/dist/features/organizations/index.spec.unit.d.ts +1 -0
- package/dist/features/organizations/index.spec.unit.js +71 -0
- package/dist/features/organizations/index.spec.unit.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.d.ts +13 -0
- package/dist/features/organizations/list-organizations/feature.js +95 -0
- package/dist/features/organizations/list-organizations/feature.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.int.d.ts +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.int.js +32 -0
- package/dist/features/organizations/list-organizations/feature.spec.int.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.unit.d.ts +1 -0
- package/dist/features/organizations/list-organizations/feature.spec.unit.js +110 -0
- package/dist/features/organizations/list-organizations/feature.spec.unit.js.map +1 -0
- package/dist/features/organizations/list-organizations/index.d.ts +2 -0
- package/dist/features/organizations/list-organizations/index.js +3 -0
- package/dist/features/organizations/list-organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/schema.d.ts +2 -0
- package/dist/features/organizations/list-organizations/schema.js +3 -0
- package/dist/features/organizations/list-organizations/schema.js.map +1 -0
- package/dist/features/organizations/schemas.d.ts +6 -0
- package/dist/features/organizations/schemas.js +7 -0
- package/dist/features/organizations/schemas.js.map +1 -0
- package/dist/features/organizations/tool-definitions.d.ts +5 -0
- package/dist/features/organizations/tool-definitions.js +13 -0
- package/dist/features/organizations/tool-definitions.js.map +1 -0
- package/dist/features/organizations/types.d.ts +21 -0
- package/dist/features/organizations/types.js +5 -0
- package/dist/features/organizations/types.js.map +1 -0
- package/dist/features/pipelines/artifacts.d.ts +11 -0
- package/dist/features/pipelines/artifacts.js +280 -0
- package/dist/features/pipelines/artifacts.js.map +1 -0
- package/dist/features/pipelines/artifacts.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/artifacts.spec.unit.js +98 -0
- package/dist/features/pipelines/artifacts.spec.unit.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.d.ts +3 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js +216 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.spec.unit.js +63 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.d.ts +2 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js +3 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.d.ts +17 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js +20 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/get-pipeline/feature.js +43 -0
- package/dist/features/pipelines/get-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.int.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.int.js +52 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.int.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.unit.js +87 -0
- package/dist/features/pipelines/get-pipeline/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline/index.js +3 -0
- package/dist/features/pipelines/get-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/schema.d.ts +17 -0
- package/dist/features/pipelines/get-pipeline/schema.js +26 -0
- package/dist/features/pipelines/get-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js +54 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.spec.unit.js +79 -0
- package/dist/features/pipelines/get-pipeline-log/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-log/index.js +3 -0
- package/dist/features/pipelines/get-pipeline-log/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/schema.d.ts +26 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js +37 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js +73 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.spec.unit.js +154 -0
- package/dist/features/pipelines/get-pipeline-run/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run/index.js +3 -0
- package/dist/features/pipelines/get-pipeline-run/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/schema.d.ts +14 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js +16 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js.map +1 -0
- package/dist/features/pipelines/helpers.d.ts +3 -0
- package/dist/features/pipelines/helpers.js +25 -0
- package/dist/features/pipelines/helpers.js.map +1 -0
- package/dist/features/pipelines/index.d.ts +19 -0
- package/dist/features/pipelines/index.js +137 -0
- package/dist/features/pipelines/index.js.map +1 -0
- package/dist/features/pipelines/index.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/index.spec.unit.js +221 -0
- package/dist/features/pipelines/index.spec.unit.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.d.ts +3 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js +95 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.spec.unit.js +146 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js +3 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.d.ts +35 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js +47 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.d.ts +10 -0
- package/dist/features/pipelines/list-pipelines/feature.js +39 -0
- package/dist/features/pipelines/list-pipelines/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.int.d.ts +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.int.js +34 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.int.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.unit.js +89 -0
- package/dist/features/pipelines/list-pipelines/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipelines/index.js +3 -0
- package/dist/features/pipelines/list-pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/schema.d.ts +17 -0
- package/dist/features/pipelines/list-pipelines/schema.js +20 -0
- package/dist/features/pipelines/list-pipelines/schema.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.d.ts +3 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js +92 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.spec.unit.js +98 -0
- package/dist/features/pipelines/pipeline-timeline/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/index.d.ts +2 -0
- package/dist/features/pipelines/pipeline-timeline/index.js +3 -0
- package/dist/features/pipelines/pipeline-timeline/index.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/schema.d.ts +23 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js +48 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js.map +1 -0
- package/dist/features/pipelines/tool-definitions.d.ts +5 -0
- package/dist/features/pipelines/tool-definitions.js +63 -0
- package/dist/features/pipelines/tool-definitions.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js +62 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.int.d.ts +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.int.js +83 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.int.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.unit.d.ts +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.unit.js +110 -0
- package/dist/features/pipelines/trigger-pipeline/feature.spec.unit.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/trigger-pipeline/index.js +3 -0
- package/dist/features/pipelines/trigger-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/schema.d.ts +41 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js +42 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/types.d.ts +122 -0
- package/dist/features/pipelines/types.js +2 -0
- package/dist/features/pipelines/types.js.map +1 -0
- package/dist/features/projects/__test__/test-helpers.d.ts +13 -0
- package/dist/features/projects/__test__/test-helpers.js +31 -0
- package/dist/features/projects/__test__/test-helpers.js.map +1 -0
- package/dist/features/projects/get-project/feature.d.ts +11 -0
- package/dist/features/projects/get-project/feature.js +26 -0
- package/dist/features/projects/get-project/feature.js.map +1 -0
- package/dist/features/projects/get-project/feature.spec.int.d.ts +1 -0
- package/dist/features/projects/get-project/feature.spec.int.js +37 -0
- package/dist/features/projects/get-project/feature.spec.int.js.map +1 -0
- package/dist/features/projects/get-project/feature.spec.unit.d.ts +1 -0
- package/dist/features/projects/get-project/feature.spec.unit.js +39 -0
- package/dist/features/projects/get-project/feature.spec.unit.js.map +1 -0
- package/dist/features/projects/get-project/index.d.ts +2 -0
- package/dist/features/projects/get-project/index.js +3 -0
- package/dist/features/projects/get-project/index.js.map +1 -0
- package/dist/features/projects/get-project/schema.d.ts +2 -0
- package/dist/features/projects/get-project/schema.js +3 -0
- package/dist/features/projects/get-project/schema.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.d.ts +78 -0
- package/dist/features/projects/get-project-details/feature.js +182 -0
- package/dist/features/projects/get-project-details/feature.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.spec.int.d.ts +1 -0
- package/dist/features/projects/get-project-details/feature.spec.int.js +118 -0
- package/dist/features/projects/get-project-details/feature.spec.int.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.spec.unit.d.ts +1 -0
- package/dist/features/projects/get-project-details/feature.spec.unit.js +377 -0
- package/dist/features/projects/get-project-details/feature.spec.unit.js.map +1 -0
- package/dist/features/projects/get-project-details/index.d.ts +2 -0
- package/dist/features/projects/get-project-details/index.js +3 -0
- package/dist/features/projects/get-project-details/index.js.map +1 -0
- package/dist/features/projects/get-project-details/schema.d.ts +2 -0
- package/dist/features/projects/get-project-details/schema.js +3 -0
- package/dist/features/projects/get-project-details/schema.js.map +1 -0
- package/dist/features/projects/index.d.ts +15 -0
- package/dist/features/projects/index.js +61 -0
- package/dist/features/projects/index.js.map +1 -0
- package/dist/features/projects/index.spec.unit.d.ts +1 -0
- package/dist/features/projects/index.spec.unit.js +129 -0
- package/dist/features/projects/index.spec.unit.js.map +1 -0
- package/dist/features/projects/list-projects/feature.d.ts +10 -0
- package/dist/features/projects/list-projects/feature.js +22 -0
- package/dist/features/projects/list-projects/feature.js.map +1 -0
- package/dist/features/projects/list-projects/feature.spec.int.d.ts +1 -0
- package/dist/features/projects/list-projects/feature.spec.int.js +52 -0
- package/dist/features/projects/list-projects/feature.spec.int.js.map +1 -0
- package/dist/features/projects/list-projects/index.d.ts +2 -0
- package/dist/features/projects/list-projects/index.js +3 -0
- package/dist/features/projects/list-projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/schema.d.ts +2 -0
- package/dist/features/projects/list-projects/schema.js +3 -0
- package/dist/features/projects/list-projects/schema.js.map +1 -0
- package/dist/features/projects/schemas.d.ts +64 -0
- package/dist/features/projects/schemas.js +73 -0
- package/dist/features/projects/schemas.js.map +1 -0
- package/dist/features/projects/tool-definitions.d.ts +5 -0
- package/dist/features/projects/tool-definitions.js +23 -0
- package/dist/features/projects/tool-definitions.js.map +1 -0
- package/dist/features/projects/types.d.ts +11 -0
- package/dist/features/projects/types.js +2 -0
- package/dist/features/projects/types.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.d.ts +13 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js +127 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.int.js +184 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.unit.js +257 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js +2 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.d.ts +12 -0
- package/dist/features/pull-requests/create-pull-request/feature.js +96 -0
- package/dist/features/pull-requests/create-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.int.js +109 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.unit.js +110 -0
- package/dist/features/pull-requests/create-pull-request/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/index.js +3 -0
- package/dist/features/pull-requests/create-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/schema.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/schema.js +3 -0
- package/dist/features/pull-requests/create-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.d.ts +6 -0
- package/dist/features/pull-requests/get-pull-request/feature.js +19 -0
- package/dist/features/pull-requests/get-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.int.js +107 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.unit.js +35 -0
- package/dist/features/pull-requests/get-pull-request/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/get-pull-request/index.js +3 -0
- package/dist/features/pull-requests/get-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.js +2 -0
- package/dist/features/pull-requests/get-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.d.ts +22 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js +57 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.spec.unit.js +75 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js +2 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.d.ts +51 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js +256 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.spec.unit.js +136 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js +2 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.d.ts +13 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js +85 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.int.js +214 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.unit.js +338 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js +2 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js.map +1 -0
- package/dist/features/pull-requests/index.d.ts +20 -0
- package/dist/features/pull-requests/index.js +138 -0
- package/dist/features/pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/index.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/index.spec.unit.js +259 -0
- package/dist/features/pull-requests/index.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.d.ts +17 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js +78 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.int.js +122 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.unit.js +178 -0
- package/dist/features/pull-requests/list-pull-requests/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/index.d.ts +2 -0
- package/dist/features/pull-requests/list-pull-requests/index.js +3 -0
- package/dist/features/pull-requests/list-pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js +2 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js.map +1 -0
- package/dist/features/pull-requests/schemas.d.ts +318 -0
- package/dist/features/pull-requests/schemas.js +280 -0
- package/dist/features/pull-requests/schemas.js.map +1 -0
- package/dist/features/pull-requests/tool-definitions.d.ts +5 -0
- package/dist/features/pull-requests/tool-definitions.js +52 -0
- package/dist/features/pull-requests/tool-definitions.js.map +1 -0
- package/dist/features/pull-requests/types.d.ts +100 -0
- package/dist/features/pull-requests/types.js +2 -0
- package/dist/features/pull-requests/types.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.d.ts +9 -0
- package/dist/features/pull-requests/update-pull-request/feature.js +246 -0
- package/dist/features/pull-requests/update-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.int.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.int.js +160 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.int.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.unit.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.unit.js +278 -0
- package/dist/features/pull-requests/update-pull-request/feature.spec.unit.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/index.js +2 -0
- package/dist/features/pull-requests/update-pull-request/index.js.map +1 -0
- package/dist/features/releases/create-release/feature.d.ts +3 -0
- package/dist/features/releases/create-release/feature.js +48 -0
- package/dist/features/releases/create-release/feature.js.map +1 -0
- package/dist/features/releases/create-release/index.d.ts +2 -0
- package/dist/features/releases/create-release/index.js +3 -0
- package/dist/features/releases/create-release/index.js.map +1 -0
- package/dist/features/releases/create-release/schema.d.ts +20 -0
- package/dist/features/releases/create-release/schema.js +21 -0
- package/dist/features/releases/create-release/schema.js.map +1 -0
- package/dist/features/releases/deploy-release-stage/feature.d.ts +9 -0
- package/dist/features/releases/deploy-release-stage/feature.js +35 -0
- package/dist/features/releases/deploy-release-stage/feature.js.map +1 -0
- package/dist/features/releases/deploy-release-stage/index.d.ts +2 -0
- package/dist/features/releases/deploy-release-stage/index.js +3 -0
- package/dist/features/releases/deploy-release-stage/index.js.map +1 -0
- package/dist/features/releases/deploy-release-stage/schema.d.ts +17 -0
- package/dist/features/releases/deploy-release-stage/schema.js +17 -0
- package/dist/features/releases/deploy-release-stage/schema.js.map +1 -0
- package/dist/features/releases/get-release/feature.d.ts +3 -0
- package/dist/features/releases/get-release/feature.js +31 -0
- package/dist/features/releases/get-release/feature.js.map +1 -0
- package/dist/features/releases/get-release/index.d.ts +2 -0
- package/dist/features/releases/get-release/index.js +3 -0
- package/dist/features/releases/get-release/index.js.map +1 -0
- package/dist/features/releases/get-release/schema.d.ts +11 -0
- package/dist/features/releases/get-release/schema.js +10 -0
- package/dist/features/releases/get-release/schema.js.map +1 -0
- package/dist/features/releases/get-release-definition/feature.d.ts +3 -0
- package/dist/features/releases/get-release-definition/feature.js +31 -0
- package/dist/features/releases/get-release-definition/feature.js.map +1 -0
- package/dist/features/releases/get-release-definition/index.d.ts +2 -0
- package/dist/features/releases/get-release-definition/index.js +3 -0
- package/dist/features/releases/get-release-definition/index.js.map +1 -0
- package/dist/features/releases/get-release-definition/schema.d.ts +11 -0
- package/dist/features/releases/get-release-definition/schema.js +10 -0
- package/dist/features/releases/get-release-definition/schema.js.map +1 -0
- package/dist/features/releases/index.d.ts +11 -0
- package/dist/features/releases/index.js +102 -0
- package/dist/features/releases/index.js.map +1 -0
- package/dist/features/releases/list-release-definitions/feature.d.ts +3 -0
- package/dist/features/releases/list-release-definitions/feature.js +28 -0
- package/dist/features/releases/list-release-definitions/feature.js.map +1 -0
- package/dist/features/releases/list-release-definitions/index.d.ts +2 -0
- package/dist/features/releases/list-release-definitions/index.js +3 -0
- package/dist/features/releases/list-release-definitions/index.js.map +1 -0
- package/dist/features/releases/list-release-definitions/schema.d.ts +17 -0
- package/dist/features/releases/list-release-definitions/schema.js +21 -0
- package/dist/features/releases/list-release-definitions/schema.js.map +1 -0
- package/dist/features/releases/list-releases/feature.d.ts +3 -0
- package/dist/features/releases/list-releases/feature.js +28 -0
- package/dist/features/releases/list-releases/feature.js.map +1 -0
- package/dist/features/releases/list-releases/index.d.ts +2 -0
- package/dist/features/releases/list-releases/index.js +3 -0
- package/dist/features/releases/list-releases/index.js.map +1 -0
- package/dist/features/releases/list-releases/schema.d.ts +26 -0
- package/dist/features/releases/list-releases/schema.js +27 -0
- package/dist/features/releases/list-releases/schema.js.map +1 -0
- package/dist/features/releases/tool-definitions.d.ts +2 -0
- package/dist/features/releases/tool-definitions.js +46 -0
- package/dist/features/releases/tool-definitions.js.map +1 -0
- package/dist/features/releases/types.d.ts +32 -0
- package/dist/features/releases/types.js +2 -0
- package/dist/features/releases/types.js.map +1 -0
- package/dist/features/repositories/__test__/test-helpers.d.ts +13 -0
- package/dist/features/repositories/__test__/test-helpers.js +31 -0
- package/dist/features/repositories/__test__/test-helpers.js.map +1 -0
- package/dist/features/repositories/create-branch/feature.d.ts +6 -0
- package/dist/features/repositories/create-branch/feature.js +30 -0
- package/dist/features/repositories/create-branch/feature.js.map +1 -0
- package/dist/features/repositories/create-branch/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/create-branch/feature.spec.unit.js +34 -0
- package/dist/features/repositories/create-branch/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/create-branch/index.d.ts +1 -0
- package/dist/features/repositories/create-branch/index.js +2 -0
- package/dist/features/repositories/create-branch/index.js.map +1 -0
- package/dist/features/repositories/create-commit/feature.d.ts +6 -0
- package/dist/features/repositories/create-commit/feature.js +119 -0
- package/dist/features/repositories/create-commit/feature.js.map +1 -0
- package/dist/features/repositories/create-commit/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/create-commit/feature.spec.unit.js +155 -0
- package/dist/features/repositories/create-commit/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/create-commit/index.d.ts +1 -0
- package/dist/features/repositories/create-commit/index.js +2 -0
- package/dist/features/repositories/create-commit/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.d.ts +22 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js +299 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.int.js +87 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.unit.js +389 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/index.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js +3 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js +4 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.d.ts +23 -0
- package/dist/features/repositories/get-file-content/feature.js +93 -0
- package/dist/features/repositories/get-file-content/feature.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.int.js +84 -0
- package/dist/features/repositories/get-file-content/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-file-content/feature.spec.unit.js +126 -0
- package/dist/features/repositories/get-file-content/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-file-content/index.d.ts +2 -0
- package/dist/features/repositories/get-file-content/index.js +3 -0
- package/dist/features/repositories/get-file-content/index.js.map +1 -0
- package/dist/features/repositories/get-file-content/schema.d.ts +2 -0
- package/dist/features/repositories/get-file-content/schema.js +4 -0
- package/dist/features/repositories/get-file-content/schema.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.d.ts +12 -0
- package/dist/features/repositories/get-repository/feature.js +27 -0
- package/dist/features/repositories/get-repository/feature.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-repository/feature.spec.int.js +42 -0
- package/dist/features/repositories/get-repository/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-repository/feature.spec.unit.js +39 -0
- package/dist/features/repositories/get-repository/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-repository/index.d.ts +2 -0
- package/dist/features/repositories/get-repository/index.js +3 -0
- package/dist/features/repositories/get-repository/index.js.map +1 -0
- package/dist/features/repositories/get-repository/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository/schema.js +3 -0
- package/dist/features/repositories/get-repository/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.d.ts +11 -0
- package/dist/features/repositories/get-repository-details/feature.js +64 -0
- package/dist/features/repositories/get-repository-details/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.int.js +117 -0
- package/dist/features/repositories/get-repository-details/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-repository-details/feature.spec.unit.js +253 -0
- package/dist/features/repositories/get-repository-details/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-repository-details/index.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/index.js +3 -0
- package/dist/features/repositories/get-repository-details/index.js.map +1 -0
- package/dist/features/repositories/get-repository-details/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/schema.js +3 -0
- package/dist/features/repositories/get-repository-details/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/feature.d.ts +6 -0
- package/dist/features/repositories/get-repository-tree/feature.js +62 -0
- package/dist/features/repositories/get-repository-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/get-repository-tree/feature.spec.unit.js +67 -0
- package/dist/features/repositories/get-repository-tree/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/index.d.ts +1 -0
- package/dist/features/repositories/get-repository-tree/index.js +2 -0
- package/dist/features/repositories/get-repository-tree/index.js.map +1 -0
- package/dist/features/repositories/index.d.ts +21 -0
- package/dist/features/repositories/index.js +160 -0
- package/dist/features/repositories/index.js.map +1 -0
- package/dist/features/repositories/index.spec.unit.d.ts +1 -0
- package/dist/features/repositories/index.spec.unit.js +289 -0
- package/dist/features/repositories/index.spec.unit.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.d.ts +6 -0
- package/dist/features/repositories/list-commits/feature.js +72 -0
- package/dist/features/repositories/list-commits/feature.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/list-commits/feature.spec.unit.js +56 -0
- package/dist/features/repositories/list-commits/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/list-commits/index.d.ts +1 -0
- package/dist/features/repositories/list-commits/index.js +2 -0
- package/dist/features/repositories/list-commits/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.d.ts +10 -0
- package/dist/features/repositories/list-repositories/feature.js +22 -0
- package/dist/features/repositories/list-repositories/feature.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.int.d.ts +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.int.js +54 -0
- package/dist/features/repositories/list-repositories/feature.spec.int.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.unit.d.ts +1 -0
- package/dist/features/repositories/list-repositories/feature.spec.unit.js +57 -0
- package/dist/features/repositories/list-repositories/feature.spec.unit.js.map +1 -0
- package/dist/features/repositories/list-repositories/index.d.ts +2 -0
- package/dist/features/repositories/list-repositories/index.js +3 -0
- package/dist/features/repositories/list-repositories/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/schema.d.ts +2 -0
- package/dist/features/repositories/list-repositories/schema.js +3 -0
- package/dist/features/repositories/list-repositories/schema.js.map +1 -0
- package/dist/features/repositories/schemas.d.ts +237 -0
- package/dist/features/repositories/schemas.js +303 -0
- package/dist/features/repositories/schemas.js.map +1 -0
- package/dist/features/repositories/tool-definitions.d.ts +5 -0
- package/dist/features/repositories/tool-definitions.js +91 -0
- package/dist/features/repositories/tool-definitions.js.map +1 -0
- package/dist/features/repositories/types.d.ts +167 -0
- package/dist/features/repositories/types.js +2 -0
- package/dist/features/repositories/types.js.map +1 -0
- package/dist/features/search/index.d.ts +15 -0
- package/dist/features/search/index.js +46 -0
- package/dist/features/search/index.js.map +1 -0
- package/dist/features/search/index.spec.unit.d.ts +1 -0
- package/dist/features/search/index.spec.unit.js +141 -0
- package/dist/features/search/index.spec.unit.js.map +1 -0
- package/dist/features/search/schemas.d.ts +171 -0
- package/dist/features/search/schemas.js +156 -0
- package/dist/features/search/schemas.js.map +1 -0
- package/dist/features/search/schemas.spec.unit.d.ts +0 -0
- package/dist/features/search/schemas.spec.unit.js +38 -0
- package/dist/features/search/schemas.spec.unit.js.map +1 -0
- package/dist/features/search/search-code/feature.d.ts +10 -0
- package/dist/features/search/search-code/feature.js +171 -0
- package/dist/features/search/search-code/feature.js.map +1 -0
- package/dist/features/search/search-code/feature.spec.int.d.ts +1 -0
- package/dist/features/search/search-code/feature.spec.int.js +190 -0
- package/dist/features/search/search-code/feature.spec.int.js.map +1 -0
- package/dist/features/search/search-code/feature.spec.unit.d.ts +1 -0
- package/dist/features/search/search-code/feature.spec.unit.js +963 -0
- package/dist/features/search/search-code/feature.spec.unit.js.map +1 -0
- package/dist/features/search/search-code/index.d.ts +2 -0
- package/dist/features/search/search-code/index.js +3 -0
- package/dist/features/search/search-code/index.js.map +1 -0
- package/dist/features/search/search-wiki/feature.d.ts +10 -0
- package/dist/features/search/search-wiki/feature.js +126 -0
- package/dist/features/search/search-wiki/feature.js.map +1 -0
- package/dist/features/search/search-wiki/feature.spec.int.d.ts +1 -0
- package/dist/features/search/search-wiki/feature.spec.int.js +65 -0
- package/dist/features/search/search-wiki/feature.spec.int.js.map +1 -0
- package/dist/features/search/search-wiki/feature.spec.unit.d.ts +1 -0
- package/dist/features/search/search-wiki/feature.spec.unit.js +171 -0
- package/dist/features/search/search-wiki/feature.spec.unit.js.map +1 -0
- package/dist/features/search/search-wiki/index.d.ts +1 -0
- package/dist/features/search/search-wiki/index.js +2 -0
- package/dist/features/search/search-wiki/index.js.map +1 -0
- package/dist/features/search/search-work-items/feature.d.ts +10 -0
- package/dist/features/search/search-work-items/feature.js +112 -0
- package/dist/features/search/search-work-items/feature.js.map +1 -0
- package/dist/features/search/search-work-items/feature.spec.int.d.ts +1 -0
- package/dist/features/search/search-work-items/feature.spec.int.js +148 -0
- package/dist/features/search/search-work-items/feature.spec.int.js.map +1 -0
- package/dist/features/search/search-work-items/feature.spec.unit.d.ts +1 -0
- package/dist/features/search/search-work-items/feature.spec.unit.js +337 -0
- package/dist/features/search/search-work-items/feature.spec.unit.js.map +1 -0
- package/dist/features/search/search-work-items/index.d.ts +1 -0
- package/dist/features/search/search-work-items/index.js +2 -0
- package/dist/features/search/search-work-items/index.js.map +1 -0
- package/dist/features/search/tool-definitions.d.ts +5 -0
- package/dist/features/search/tool-definitions.js +23 -0
- package/dist/features/search/tool-definitions.js.map +1 -0
- package/dist/features/search/types.d.ts +537 -0
- package/dist/features/search/types.js +2 -0
- package/dist/features/search/types.js.map +1 -0
- package/dist/features/users/get-me/feature.d.ts +12 -0
- package/dist/features/users/get-me/feature.js +90 -0
- package/dist/features/users/get-me/feature.js.map +1 -0
- package/dist/features/users/get-me/feature.spec.int.d.ts +1 -0
- package/dist/features/users/get-me/feature.spec.int.js +31 -0
- package/dist/features/users/get-me/feature.spec.int.js.map +1 -0
- package/dist/features/users/get-me/feature.spec.unit.d.ts +1 -0
- package/dist/features/users/get-me/feature.spec.unit.js +159 -0
- package/dist/features/users/get-me/feature.spec.unit.js.map +1 -0
- package/dist/features/users/get-me/index.d.ts +2 -0
- package/dist/features/users/get-me/index.js +3 -0
- package/dist/features/users/get-me/index.js.map +1 -0
- package/dist/features/users/get-me/schema.d.ts +2 -0
- package/dist/features/users/get-me/schema.js +3 -0
- package/dist/features/users/get-me/schema.js.map +1 -0
- package/dist/features/users/index.d.ts +17 -0
- package/dist/features/users/index.js +33 -0
- package/dist/features/users/index.js.map +1 -0
- package/dist/features/users/index.spec.unit.d.ts +1 -0
- package/dist/features/users/index.spec.unit.js +69 -0
- package/dist/features/users/index.spec.unit.js.map +1 -0
- package/dist/features/users/schemas.d.ts +5 -0
- package/dist/features/users/schemas.js +6 -0
- package/dist/features/users/schemas.js.map +1 -0
- package/dist/features/users/tool-definitions.d.ts +5 -0
- package/dist/features/users/tool-definitions.js +13 -0
- package/dist/features/users/tool-definitions.js.map +1 -0
- package/dist/features/users/types.d.ts +17 -0
- package/dist/features/users/types.js +2 -0
- package/dist/features/users/types.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.d.ts +49 -0
- package/dist/features/wikis/create-wiki/feature.js +53 -0
- package/dist/features/wikis/create-wiki/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.int.js +42 -0
- package/dist/features/wikis/create-wiki/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/create-wiki/feature.spec.unit.js +166 -0
- package/dist/features/wikis/create-wiki/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/create-wiki/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki/index.js +3 -0
- package/dist/features/wikis/create-wiki/index.js.map +1 -0
- package/dist/features/wikis/create-wiki/schema.d.ts +53 -0
- package/dist/features/wikis/create-wiki/schema.js +57 -0
- package/dist/features/wikis/create-wiki/schema.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.d.ts +18 -0
- package/dist/features/wikis/create-wiki-page/feature.js +58 -0
- package/dist/features/wikis/create-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.int.js +272 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.unit.js +139 -0
- package/dist/features/wikis/create-wiki-page/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki-page/index.js +3 -0
- package/dist/features/wikis/create-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/schema.d.ts +26 -0
- package/dist/features/wikis/create-wiki-page/schema.js +33 -0
- package/dist/features/wikis/create-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.d.ts +33 -0
- package/dist/features/wikis/get-wiki-page/feature.js +32 -0
- package/dist/features/wikis/get-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.int.js +56 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.unit.js +86 -0
- package/dist/features/wikis/get-wiki-page/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/get-wiki-page/index.js +3 -0
- package/dist/features/wikis/get-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/schema.d.ts +20 -0
- package/dist/features/wikis/get-wiki-page/schema.js +20 -0
- package/dist/features/wikis/get-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.d.ts +25 -0
- package/dist/features/wikis/get-wikis/feature.js +34 -0
- package/dist/features/wikis/get-wikis/feature.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.int.js +32 -0
- package/dist/features/wikis/get-wikis/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/get-wikis/feature.spec.unit.js +81 -0
- package/dist/features/wikis/get-wikis/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/get-wikis/index.d.ts +2 -0
- package/dist/features/wikis/get-wikis/index.js +3 -0
- package/dist/features/wikis/get-wikis/index.js.map +1 -0
- package/dist/features/wikis/get-wikis/schema.d.ts +14 -0
- package/dist/features/wikis/get-wikis/schema.js +18 -0
- package/dist/features/wikis/get-wikis/schema.js.map +1 -0
- package/dist/features/wikis/index.d.ts +16 -0
- package/dist/features/wikis/index.js +109 -0
- package/dist/features/wikis/index.js.map +1 -0
- package/dist/features/wikis/index.spec.unit.d.ts +1 -0
- package/dist/features/wikis/index.spec.unit.js +212 -0
- package/dist/features/wikis/index.spec.unit.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.d.ts +20 -0
- package/dist/features/wikis/list-wiki-pages/feature.js +43 -0
- package/dist/features/wikis/list-wiki-pages/feature.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.int.js +228 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.unit.d.ts +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.unit.js +392 -0
- package/dist/features/wikis/list-wiki-pages/feature.spec.unit.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/index.d.ts +2 -0
- package/dist/features/wikis/list-wiki-pages/index.js +3 -0
- package/dist/features/wikis/list-wiki-pages/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/schema.d.ts +18 -0
- package/dist/features/wikis/list-wiki-pages/schema.js +19 -0
- package/dist/features/wikis/list-wiki-pages/schema.js.map +1 -0
- package/dist/features/wikis/tool-definitions.d.ts +5 -0
- package/dist/features/wikis/tool-definitions.js +43 -0
- package/dist/features/wikis/tool-definitions.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/feature.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/feature.js +27 -0
- package/dist/features/wikis/update-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/feature.spec.int.d.ts +1 -0
- package/dist/features/wikis/update-wiki-page/feature.spec.int.js +37 -0
- package/dist/features/wikis/update-wiki-page/feature.spec.int.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/update-wiki-page/index.js +3 -0
- package/dist/features/wikis/update-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/schema.d.ts +26 -0
- package/dist/features/wikis/update-wiki-page/schema.js +29 -0
- package/dist/features/wikis/update-wiki-page/schema.js.map +1 -0
- package/dist/features/work-items/__test__/fixtures.d.ts +9 -0
- package/dist/features/work-items/__test__/fixtures.js +23 -0
- package/dist/features/work-items/__test__/fixtures.js.map +1 -0
- package/dist/features/work-items/__test__/test-helpers.d.ts +13 -0
- package/dist/features/work-items/__test__/test-helpers.js +31 -0
- package/dist/features/work-items/__test__/test-helpers.js.map +1 -0
- package/dist/features/work-items/__test__/test-utils.d.ts +17 -0
- package/dist/features/work-items/__test__/test-utils.js +35 -0
- package/dist/features/work-items/__test__/test-utils.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/create-work-item/feature.js +96 -0
- package/dist/features/work-items/create-work-item/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.int.js +103 -0
- package/dist/features/work-items/create-work-item/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/create-work-item/feature.spec.unit.js +44 -0
- package/dist/features/work-items/create-work-item/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/create-work-item/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item/index.js +3 -0
- package/dist/features/work-items/create-work-item/index.js.map +1 -0
- package/dist/features/work-items/create-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item/schema.js +3 -0
- package/dist/features/work-items/create-work-item/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/get-work-item/feature.js +66 -0
- package/dist/features/work-items/get-work-item/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.int.js +136 -0
- package/dist/features/work-items/get-work-item/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/get-work-item/feature.spec.unit.js +29 -0
- package/dist/features/work-items/get-work-item/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/get-work-item/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item/index.js +3 -0
- package/dist/features/work-items/get-work-item/index.js.map +1 -0
- package/dist/features/work-items/get-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item/schema.js +3 -0
- package/dist/features/work-items/get-work-item/schema.js.map +1 -0
- package/dist/features/work-items/index.d.ts +17 -0
- package/dist/features/work-items/index.js +103 -0
- package/dist/features/work-items/index.js.map +1 -0
- package/dist/features/work-items/index.spec.unit.d.ts +1 -0
- package/dist/features/work-items/index.spec.unit.js +197 -0
- package/dist/features/work-items/index.spec.unit.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.d.ts +10 -0
- package/dist/features/work-items/list-work-items/feature.js +86 -0
- package/dist/features/work-items/list-work-items/feature.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.int.js +101 -0
- package/dist/features/work-items/list-work-items/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/list-work-items/feature.spec.unit.js +93 -0
- package/dist/features/work-items/list-work-items/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/list-work-items/index.d.ts +2 -0
- package/dist/features/work-items/list-work-items/index.js +3 -0
- package/dist/features/work-items/list-work-items/index.js.map +1 -0
- package/dist/features/work-items/list-work-items/schema.d.ts +2 -0
- package/dist/features/work-items/list-work-items/schema.js +3 -0
- package/dist/features/work-items/list-work-items/schema.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.d.ts +24 -0
- package/dist/features/work-items/manage-work-item-link/feature.js +73 -0
- package/dist/features/work-items/manage-work-item-link/feature.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.int.js +73 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.unit.js +135 -0
- package/dist/features/work-items/manage-work-item-link/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/index.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/index.js +3 -0
- package/dist/features/work-items/manage-work-item-link/index.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/schema.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/schema.js +3 -0
- package/dist/features/work-items/manage-work-item-link/schema.js.map +1 -0
- package/dist/features/work-items/schemas.d.ts +147 -0
- package/dist/features/work-items/schemas.js +131 -0
- package/dist/features/work-items/schemas.js.map +1 -0
- package/dist/features/work-items/tool-definitions.d.ts +5 -0
- package/dist/features/work-items/tool-definitions.js +33 -0
- package/dist/features/work-items/tool-definitions.js.map +1 -0
- package/dist/features/work-items/types.d.ts +39 -0
- package/dist/features/work-items/types.js +2 -0
- package/dist/features/work-items/types.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/update-work-item/feature.js +100 -0
- package/dist/features/work-items/update-work-item/feature.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.int.d.ts +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.int.js +82 -0
- package/dist/features/work-items/update-work-item/feature.spec.int.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.unit.d.ts +1 -0
- package/dist/features/work-items/update-work-item/feature.spec.unit.js +36 -0
- package/dist/features/work-items/update-work-item/feature.spec.unit.js.map +1 -0
- package/dist/features/work-items/update-work-item/index.d.ts +2 -0
- package/dist/features/work-items/update-work-item/index.js +3 -0
- package/dist/features/work-items/update-work-item/index.js.map +1 -0
- package/dist/features/work-items/update-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/update-work-item/schema.js +3 -0
- package/dist/features/work-items/update-work-item/schema.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +127931 -0
- package/dist/index.js.map +1 -0
- package/dist/index.spec.unit.d.ts +1 -0
- package/dist/index.spec.unit.js +81 -0
- package/dist/index.spec.unit.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +378 -0
- package/dist/server.js.map +1 -0
- package/dist/server.spec.e2e.d.ts +1 -0
- package/dist/server.spec.e2e.js +224 -0
- package/dist/server.spec.e2e.js.map +1 -0
- package/dist/setup-env.spec.unit.d.ts +1 -0
- package/dist/setup-env.spec.unit.js +144 -0
- package/dist/setup-env.spec.unit.js.map +1 -0
- package/dist/setup.d.ts +6 -0
- package/dist/setup.js +124 -0
- package/dist/setup.js.map +1 -0
- package/dist/shared/api/client.d.ts +91 -0
- package/dist/shared/api/client.js +238 -0
- package/dist/shared/api/client.js.map +1 -0
- package/dist/shared/api/index.d.ts +1 -0
- package/dist/shared/api/index.js +2 -0
- package/dist/shared/api/index.js.map +1 -0
- package/dist/shared/auth/auth-factory.d.ts +43 -0
- package/dist/shared/auth/auth-factory.js +136 -0
- package/dist/shared/auth/auth-factory.js.map +1 -0
- package/dist/shared/auth/auth-factory.spec.unit.d.ts +1 -0
- package/dist/shared/auth/auth-factory.spec.unit.js +36 -0
- package/dist/shared/auth/auth-factory.spec.unit.js.map +1 -0
- package/dist/shared/auth/client-factory.d.ts +109 -0
- package/dist/shared/auth/client-factory.js +268 -0
- package/dist/shared/auth/client-factory.js.map +1 -0
- package/dist/shared/auth/index.d.ts +11 -0
- package/dist/shared/auth/index.js +12 -0
- package/dist/shared/auth/index.js.map +1 -0
- package/dist/shared/azure-devops-url.d.ts +17 -0
- package/dist/shared/azure-devops-url.js +116 -0
- package/dist/shared/azure-devops-url.js.map +1 -0
- package/dist/shared/azure-devops-url.spec.unit.d.ts +1 -0
- package/dist/shared/azure-devops-url.spec.unit.js +101 -0
- package/dist/shared/azure-devops-url.spec.unit.js.map +1 -0
- package/dist/shared/config/index.d.ts +1 -0
- package/dist/shared/config/index.js +2 -0
- package/dist/shared/config/index.js.map +1 -0
- package/dist/shared/config/version.d.ts +4 -0
- package/dist/shared/config/version.js +5 -0
- package/dist/shared/config/version.js.map +1 -0
- package/dist/shared/enums/index.d.ts +40 -0
- package/dist/shared/enums/index.js +81 -0
- package/dist/shared/enums/index.js.map +1 -0
- package/dist/shared/enums/index.spec.unit.d.ts +1 -0
- package/dist/shared/enums/index.spec.unit.js +73 -0
- package/dist/shared/enums/index.spec.unit.js.map +1 -0
- package/dist/shared/errors/azure-devops-errors.d.ts +107 -0
- package/dist/shared/errors/azure-devops-errors.js +150 -0
- package/dist/shared/errors/azure-devops-errors.js.map +1 -0
- package/dist/shared/errors/handle-request-error.d.ts +31 -0
- package/dist/shared/errors/handle-request-error.js +91 -0
- package/dist/shared/errors/handle-request-error.js.map +1 -0
- package/dist/shared/errors/index.d.ts +1 -0
- package/dist/shared/errors/index.js +2 -0
- package/dist/shared/errors/index.js.map +1 -0
- package/dist/shared/test/test-helpers.d.ts +20 -0
- package/dist/shared/test/test-helpers.js +52 -0
- package/dist/shared/test/test-helpers.js.map +1 -0
- package/dist/shared/types/config.d.ts +27 -0
- package/dist/shared/types/config.js +2 -0
- package/dist/shared/types/config.js.map +1 -0
- package/dist/shared/types/index.d.ts +1 -0
- package/dist/shared/types/index.js +2 -0
- package/dist/shared/types/index.js.map +1 -0
- package/dist/shared/types/request-handler.d.ts +21 -0
- package/dist/shared/types/request-handler.js +2 -0
- package/dist/shared/types/request-handler.js.map +1 -0
- package/dist/shared/types/tool-definition.d.ts +10 -0
- package/dist/shared/types/tool-definition.js +2 -0
- package/dist/shared/types/tool-definition.js.map +1 -0
- package/dist/shared/utils/serialize.d.ts +7 -0
- package/dist/shared/utils/serialize.js +21 -0
- package/dist/shared/utils/serialize.js.map +1 -0
- package/dist/utils/environment.d.ts +15 -0
- package/dist/utils/environment.js +45 -0
- package/dist/utils/environment.js.map +1 -0
- package/dist/utils/environment.spec.unit.d.ts +1 -0
- package/dist/utils/environment.spec.unit.js +62 -0
- package/dist/utils/environment.spec.unit.js.map +1 -0
- package/docs/SOLUTION_SUMMARY.md +145 -0
- package/docs/authentication.md +267 -0
- package/docs/azure-identity-authentication.md +187 -0
- package/docs/ci-setup.md +61 -0
- package/docs/examples/README.md +33 -0
- package/docs/examples/azure-cli-authentication.env +25 -0
- package/docs/examples/azure-identity-authentication.env +33 -0
- package/docs/examples/pat-authentication.env +24 -0
- package/docs/important-knowledge/azure-devops-rest-api-research.md +88 -0
- package/docs/important-knowledge/llm-tldr-cli.md +37 -0
- package/docs/npm-trusted-publishers-migration.md +142 -0
- package/docs/release-troubleshooting.md +153 -0
- package/docs/testing/README.md +140 -0
- package/docs/testing/setup.md +72 -0
- package/docs/tools/README.md +73 -0
- package/docs/tools/core-navigation.md +114 -0
- package/docs/tools/organizations.md +73 -0
- package/docs/tools/pipelines.md +532 -0
- package/docs/tools/projects.md +114 -0
- package/docs/tools/pull-requests.md +1108 -0
- package/docs/tools/repositories.md +610 -0
- package/docs/tools/resources.md +133 -0
- package/docs/tools/search.md +165 -0
- package/docs/tools/user-tools.md +39 -0
- package/docs/tools/wiki.md +192 -0
- package/docs/tools/work-items.md +182 -0
- package/package.json +129 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { getMe } from './feature';
|
|
3
|
+
import { AzureDevOpsError, AzureDevOpsAuthenticationError, AzureDevOpsValidationError, } from '@/shared/errors';
|
|
4
|
+
// Mock axios
|
|
5
|
+
jest.mock('axios');
|
|
6
|
+
const mockAxios = axios;
|
|
7
|
+
// Mock env variables
|
|
8
|
+
const originalEnv = process.env;
|
|
9
|
+
describe('getMe', () => {
|
|
10
|
+
let mockConnection;
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
// Reset mocks
|
|
13
|
+
jest.resetAllMocks();
|
|
14
|
+
// Mock WebApi with a server URL
|
|
15
|
+
mockConnection = {
|
|
16
|
+
serverUrl: 'https://dev.azure.com/testorg',
|
|
17
|
+
};
|
|
18
|
+
// Mock environment variables for PAT authentication
|
|
19
|
+
process.env = {
|
|
20
|
+
...originalEnv,
|
|
21
|
+
AZURE_DEVOPS_AUTH_METHOD: 'pat',
|
|
22
|
+
AZURE_DEVOPS_PAT: 'test-pat',
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
afterEach(() => {
|
|
26
|
+
// Restore original env
|
|
27
|
+
process.env = originalEnv;
|
|
28
|
+
});
|
|
29
|
+
it('should return user profile with id, displayName, and email', async () => {
|
|
30
|
+
// Arrange
|
|
31
|
+
const mockProfile = {
|
|
32
|
+
id: 'user-id-123',
|
|
33
|
+
displayName: 'Test User',
|
|
34
|
+
emailAddress: 'test.user@example.com',
|
|
35
|
+
coreRevision: 1647,
|
|
36
|
+
timeStamp: '2023-01-01T00:00:00.000Z',
|
|
37
|
+
revision: 1647,
|
|
38
|
+
};
|
|
39
|
+
// Mock axios get to return profile data
|
|
40
|
+
mockAxios.get.mockResolvedValue({ data: mockProfile });
|
|
41
|
+
// Act
|
|
42
|
+
const result = await getMe(mockConnection);
|
|
43
|
+
// Assert
|
|
44
|
+
expect(mockAxios.get).toHaveBeenCalledWith('https://vssps.dev.azure.com/testorg/_apis/profile/profiles/me?api-version=7.1', expect.any(Object));
|
|
45
|
+
expect(result).toEqual({
|
|
46
|
+
id: 'user-id-123',
|
|
47
|
+
displayName: 'Test User',
|
|
48
|
+
email: 'test.user@example.com',
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
it('should decode organization name from URL-encoded dev.azure.com org urls', async () => {
|
|
52
|
+
mockConnection = {
|
|
53
|
+
serverUrl: 'https://dev.azure.com/test%2Dorg',
|
|
54
|
+
};
|
|
55
|
+
const mockProfile = {
|
|
56
|
+
id: 'user-id-123',
|
|
57
|
+
displayName: 'Test User',
|
|
58
|
+
emailAddress: 'test.user@example.com',
|
|
59
|
+
coreRevision: 1647,
|
|
60
|
+
timeStamp: '2023-01-01T00:00:00.000Z',
|
|
61
|
+
revision: 1647,
|
|
62
|
+
};
|
|
63
|
+
mockAxios.get.mockResolvedValue({ data: mockProfile });
|
|
64
|
+
await getMe(mockConnection);
|
|
65
|
+
expect(mockAxios.get).toHaveBeenCalledWith('https://vssps.dev.azure.com/test-org/_apis/profile/profiles/me?api-version=7.1', expect.any(Object));
|
|
66
|
+
});
|
|
67
|
+
it('should handle missing email', async () => {
|
|
68
|
+
// Arrange
|
|
69
|
+
const mockProfile = {
|
|
70
|
+
id: 'user-id-123',
|
|
71
|
+
displayName: 'Test User',
|
|
72
|
+
// No emailAddress
|
|
73
|
+
coreRevision: 1647,
|
|
74
|
+
timeStamp: '2023-01-01T00:00:00.000Z',
|
|
75
|
+
revision: 1647,
|
|
76
|
+
};
|
|
77
|
+
// Mock axios get to return profile data
|
|
78
|
+
mockAxios.get.mockResolvedValue({ data: mockProfile });
|
|
79
|
+
// Act
|
|
80
|
+
const result = await getMe(mockConnection);
|
|
81
|
+
// Assert
|
|
82
|
+
expect(result.email).toBe('');
|
|
83
|
+
});
|
|
84
|
+
it('should handle missing display name', async () => {
|
|
85
|
+
// Arrange
|
|
86
|
+
const mockProfile = {
|
|
87
|
+
id: 'user-id-123',
|
|
88
|
+
// No displayName
|
|
89
|
+
emailAddress: 'test.user@example.com',
|
|
90
|
+
coreRevision: 1647,
|
|
91
|
+
timeStamp: '2023-01-01T00:00:00.000Z',
|
|
92
|
+
revision: 1647,
|
|
93
|
+
};
|
|
94
|
+
// Mock axios get to return profile data
|
|
95
|
+
mockAxios.get.mockResolvedValue({ data: mockProfile });
|
|
96
|
+
// Act
|
|
97
|
+
const result = await getMe(mockConnection);
|
|
98
|
+
// Assert
|
|
99
|
+
expect(result.displayName).toBe('');
|
|
100
|
+
});
|
|
101
|
+
it('should handle authentication errors', async () => {
|
|
102
|
+
// Arrange
|
|
103
|
+
const axiosError = {
|
|
104
|
+
isAxiosError: true,
|
|
105
|
+
response: {
|
|
106
|
+
status: 401,
|
|
107
|
+
data: { message: 'Unauthorized' },
|
|
108
|
+
},
|
|
109
|
+
message: 'Request failed with status code 401',
|
|
110
|
+
};
|
|
111
|
+
// Mock axios get to throw error
|
|
112
|
+
mockAxios.get.mockRejectedValue(axiosError);
|
|
113
|
+
// Mock axios.isAxiosError function
|
|
114
|
+
jest.spyOn(axios, 'isAxiosError').mockImplementation(() => true);
|
|
115
|
+
// Act & Assert
|
|
116
|
+
await expect(getMe(mockConnection)).rejects.toThrow(AzureDevOpsAuthenticationError);
|
|
117
|
+
await expect(getMe(mockConnection)).rejects.toThrow(/Authentication failed/);
|
|
118
|
+
});
|
|
119
|
+
it('should reject Azure DevOps Server URLs', async () => {
|
|
120
|
+
mockConnection = {
|
|
121
|
+
serverUrl: 'https://ado.local/tfs/DefaultCollection',
|
|
122
|
+
};
|
|
123
|
+
await expect(getMe(mockConnection)).rejects.toThrow(AzureDevOpsValidationError);
|
|
124
|
+
});
|
|
125
|
+
it('should wrap general errors in AzureDevOpsError', async () => {
|
|
126
|
+
// Arrange
|
|
127
|
+
const testError = new Error('Test API error');
|
|
128
|
+
mockAxios.get.mockRejectedValue(testError);
|
|
129
|
+
// Mock axios.isAxiosError function
|
|
130
|
+
jest.spyOn(axios, 'isAxiosError').mockImplementation(() => false);
|
|
131
|
+
// Act & Assert
|
|
132
|
+
await expect(getMe(mockConnection)).rejects.toThrow(AzureDevOpsError);
|
|
133
|
+
await expect(getMe(mockConnection)).rejects.toThrow('Failed to get user information: Test API error');
|
|
134
|
+
});
|
|
135
|
+
// Test the legacy URL format of project.visualstudio.com
|
|
136
|
+
it('should work with legacy visualstudio.com URL format', async () => {
|
|
137
|
+
mockConnection = {
|
|
138
|
+
serverUrl: 'https://legacy_test_org.visualstudio.com',
|
|
139
|
+
};
|
|
140
|
+
const mockProfile = {
|
|
141
|
+
id: 'user-id-123',
|
|
142
|
+
displayName: 'Test User',
|
|
143
|
+
emailAddress: 'test.user@example.com',
|
|
144
|
+
coreRevision: 1647,
|
|
145
|
+
timeStamp: '2023-01-01T00:00:00.000Z',
|
|
146
|
+
revision: 1647,
|
|
147
|
+
};
|
|
148
|
+
mockAxios.get.mockResolvedValue({ data: mockProfile });
|
|
149
|
+
const result = await getMe(mockConnection);
|
|
150
|
+
// Verify that the organization name was correctly extracted from the legacy URL
|
|
151
|
+
expect(mockAxios.get).toHaveBeenCalledWith('https://vssps.dev.azure.com/legacy_test_org/_apis/profile/profiles/me?api-version=7.1', expect.any(Object));
|
|
152
|
+
expect(result).toEqual({
|
|
153
|
+
id: 'user-id-123',
|
|
154
|
+
displayName: 'Test User',
|
|
155
|
+
email: 'test.user@example.com',
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
//# sourceMappingURL=feature.spec.unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.spec.unit.js","sourceRoot":"","sources":["../../../../src/features/users/get-me/feature.spec.unit.ts"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAEzB,aAAa;AACb,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnB,MAAM,SAAS,GAAG,KAAkC,CAAC;AAErD,qBAAqB;AACrB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;AAEhC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,IAAI,cAAsB,CAAC;IAE3B,UAAU,CAAC,GAAG,EAAE;QACd,cAAc;QACd,IAAI,CAAC,aAAa,EAAE,CAAC;QAErB,gCAAgC;QAChC,cAAc,GAAG;YACf,SAAS,EAAE,+BAA+B;SACjC,CAAC;QAEZ,oDAAoD;QACpD,OAAO,CAAC,GAAG,GAAG;YACZ,GAAG,WAAW;YACd,wBAAwB,EAAE,KAAK;YAC/B,gBAAgB,EAAE,UAAU;SAC7B,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,uBAAuB;QACvB,OAAO,CAAC,GAAG,GAAG,WAAW,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE,KAAK,IAAI,EAAE;QAC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CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CACjD,gDAAgD,CACjD,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,yDAAyD;IACzD,EAAE,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;QACnE,cAAc,GAAG;YACf,SAAS,EAAE,0CAA0C;SAC5C,CAAC;QAEZ,MAAM,WAAW,GAAG;YAClB,EAAE,EAAE,aAAa;YACjB,WAAW,EAAE,WAAW;YACxB,YAAY,EAAE,uBAAuB;YACrC,YAAY,EAAE,IAAI;YAClB,SAAS,EAAE,0BAA0B;YACrC,QAAQ,EAAE,IAAI;SACf,CAAC;QAEF,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QAEvD,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,cAAc,CAAC,CAAC;QAE3C,gFAAgF;QAChF,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,oBAAoB,CACxC,uFAAuF,EACvF,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CACnB,CAAC;QAEF,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;YACrB,EAAE,EAAE,aAAa;YACjB,WAAW,EAAE,WAAW;YACxB,KAAK,EAAE,uBAAuB;SAC/B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/users/get-me/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/users/get-me/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Users feature module
|
|
3
|
+
*
|
|
4
|
+
* This module contains user-related functionality.
|
|
5
|
+
*/
|
|
6
|
+
export * from './types';
|
|
7
|
+
export * from './get-me';
|
|
8
|
+
export * from './tool-definitions';
|
|
9
|
+
import { RequestIdentifier, RequestHandler } from '../../shared/types/request-handler';
|
|
10
|
+
/**
|
|
11
|
+
* Checks if the request is for the users feature
|
|
12
|
+
*/
|
|
13
|
+
export declare const isUsersRequest: RequestIdentifier;
|
|
14
|
+
/**
|
|
15
|
+
* Handles users feature requests
|
|
16
|
+
*/
|
|
17
|
+
export declare const handleUsersRequest: RequestHandler;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Users feature module
|
|
3
|
+
*
|
|
4
|
+
* This module contains user-related functionality.
|
|
5
|
+
*/
|
|
6
|
+
export * from './types';
|
|
7
|
+
export * from './get-me';
|
|
8
|
+
// Export tool definitions
|
|
9
|
+
export * from './tool-definitions';
|
|
10
|
+
import { getMe } from './';
|
|
11
|
+
/**
|
|
12
|
+
* Checks if the request is for the users feature
|
|
13
|
+
*/
|
|
14
|
+
export const isUsersRequest = (request) => {
|
|
15
|
+
const toolName = request.params.name;
|
|
16
|
+
return ['get_me'].includes(toolName);
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Handles users feature requests
|
|
20
|
+
*/
|
|
21
|
+
export const handleUsersRequest = async (connection, request) => {
|
|
22
|
+
switch (request.params.name) {
|
|
23
|
+
case 'get_me': {
|
|
24
|
+
const result = await getMe(connection);
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
default:
|
|
30
|
+
throw new Error(`Unknown users tool: ${request.params.name}`);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/users/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,0BAA0B;AAC1B,cAAc,oBAAoB,CAAC;AASnC,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAE3B;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB,CAC/C,OAAwB,EACf,EAAE;IACX,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAmB,KAAK,EACrD,UAAkB,EAClB,OAAwB,EACqC,EAAE;IAC/D,QAAQ,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC5B,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,UAAU,CAAC,CAAC;YACvC,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aACnE,CAAC;QACJ,CAAC;QACD;YACE,MAAM,IAAI,KAAK,CAAC,uBAAuB,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAClE,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { isUsersRequest, handleUsersRequest } from './index';
|
|
2
|
+
import { getMe } from './get-me';
|
|
3
|
+
// Mock the imported modules
|
|
4
|
+
jest.mock('./get-me', () => ({
|
|
5
|
+
getMe: jest.fn(),
|
|
6
|
+
}));
|
|
7
|
+
describe('Users Request Handlers', () => {
|
|
8
|
+
const mockConnection = {};
|
|
9
|
+
describe('isUsersRequest', () => {
|
|
10
|
+
it('should return true for users requests', () => {
|
|
11
|
+
const request = {
|
|
12
|
+
params: { name: 'get_me', arguments: {} },
|
|
13
|
+
method: 'tools/call',
|
|
14
|
+
};
|
|
15
|
+
expect(isUsersRequest(request)).toBe(true);
|
|
16
|
+
});
|
|
17
|
+
it('should return false for non-users requests', () => {
|
|
18
|
+
const request = {
|
|
19
|
+
params: { name: 'list_projects', arguments: {} },
|
|
20
|
+
method: 'tools/call',
|
|
21
|
+
};
|
|
22
|
+
expect(isUsersRequest(request)).toBe(false);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
describe('handleUsersRequest', () => {
|
|
26
|
+
it('should handle get_me request', async () => {
|
|
27
|
+
const mockUserProfile = {
|
|
28
|
+
id: 'user-id-123',
|
|
29
|
+
displayName: 'Test User',
|
|
30
|
+
email: 'test.user@example.com',
|
|
31
|
+
};
|
|
32
|
+
getMe.mockResolvedValue(mockUserProfile);
|
|
33
|
+
const request = {
|
|
34
|
+
params: {
|
|
35
|
+
name: 'get_me',
|
|
36
|
+
arguments: {},
|
|
37
|
+
},
|
|
38
|
+
method: 'tools/call',
|
|
39
|
+
};
|
|
40
|
+
const response = await handleUsersRequest(mockConnection, request);
|
|
41
|
+
expect(response.content).toHaveLength(1);
|
|
42
|
+
expect(JSON.parse(response.content[0].text)).toEqual(mockUserProfile);
|
|
43
|
+
expect(getMe).toHaveBeenCalledWith(mockConnection);
|
|
44
|
+
});
|
|
45
|
+
it('should throw error for unknown tool', async () => {
|
|
46
|
+
const request = {
|
|
47
|
+
params: {
|
|
48
|
+
name: 'unknown_tool',
|
|
49
|
+
arguments: {},
|
|
50
|
+
},
|
|
51
|
+
method: 'tools/call',
|
|
52
|
+
};
|
|
53
|
+
await expect(handleUsersRequest(mockConnection, request)).rejects.toThrow('Unknown users tool');
|
|
54
|
+
});
|
|
55
|
+
it('should propagate errors from user functions', async () => {
|
|
56
|
+
const mockError = new Error('Test error');
|
|
57
|
+
getMe.mockRejectedValue(mockError);
|
|
58
|
+
const request = {
|
|
59
|
+
params: {
|
|
60
|
+
name: 'get_me',
|
|
61
|
+
arguments: {},
|
|
62
|
+
},
|
|
63
|
+
method: 'tools/call',
|
|
64
|
+
};
|
|
65
|
+
await expect(handleUsersRequest(mockConnection, request)).rejects.toThrow(mockError);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=index.spec.unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.spec.unit.js","sourceRoot":"","sources":["../../../src/features/users/index.spec.unit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,4BAA4B;AAC5B,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3B,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE;CACjB,CAAC,CAAC,CAAC;AAEJ,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,MAAM,cAAc,GAAG,EAAY,CAAC;IAEpC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;QAC9B,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;YAC/C,MAAM,OAAO,GAAG;gBACd,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;gBACzC,MAAM,EAAE,YAAY;aACF,CAAC;YACrB,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YACpD,MAAM,OAAO,GAAG;gBACd,MA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AAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CACvE,oBAAoB,CACrB,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6CAA6C,EAAE,KAAK,IAAI,EAAE;YAC3D,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;YACzC,KAAmB,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;YAElD,MAAM,OAAO,GAAG;gBACd,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,EAAE;iBACd;gBACD,MAAM,EAAE,YAAY;aACF,CAAC;YAErB,MAAM,MAAM,CAAC,kBAAkB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CACvE,SAAS,CACV,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/features/users/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
2
|
+
import { GetMeSchema } from './schemas';
|
|
3
|
+
/**
|
|
4
|
+
* List of users tools
|
|
5
|
+
*/
|
|
6
|
+
export const usersTools = [
|
|
7
|
+
{
|
|
8
|
+
name: 'get_me',
|
|
9
|
+
description: 'Get details of the authenticated user (id, displayName, email)',
|
|
10
|
+
inputSchema: zodToJsonSchema(GetMeSchema),
|
|
11
|
+
},
|
|
12
|
+
];
|
|
13
|
+
//# sourceMappingURL=tool-definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definitions.js","sourceRoot":"","sources":["../../../src/features/users/tool-definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAqB;IAC1C;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,gEAAgE;QAClE,WAAW,EAAE,eAAe,CAAC,WAAW,CAAC;KAC1C;CACF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User profile information
|
|
3
|
+
*/
|
|
4
|
+
export interface UserProfile {
|
|
5
|
+
/**
|
|
6
|
+
* The ID of the user
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
/**
|
|
10
|
+
* The display name of the user
|
|
11
|
+
*/
|
|
12
|
+
displayName: string;
|
|
13
|
+
/**
|
|
14
|
+
* The email address of the user
|
|
15
|
+
*/
|
|
16
|
+
email: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/features/users/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
import { WikiType } from './schema';
|
|
3
|
+
/**
|
|
4
|
+
* Options for creating a wiki
|
|
5
|
+
*/
|
|
6
|
+
export interface CreateWikiOptions {
|
|
7
|
+
/**
|
|
8
|
+
* The ID or name of the organization
|
|
9
|
+
* If not provided, the default organization will be used
|
|
10
|
+
*/
|
|
11
|
+
organizationId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The ID or name of the project
|
|
14
|
+
* If not provided, the default project will be used
|
|
15
|
+
*/
|
|
16
|
+
projectId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The name of the new wiki
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* Type of wiki to create (projectWiki or codeWiki)
|
|
23
|
+
* Default is projectWiki
|
|
24
|
+
*/
|
|
25
|
+
type?: WikiType;
|
|
26
|
+
/**
|
|
27
|
+
* The ID of the repository to associate with the wiki
|
|
28
|
+
* Required when type is codeWiki
|
|
29
|
+
*/
|
|
30
|
+
repositoryId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Folder path inside repository which is shown as Wiki
|
|
33
|
+
* Only applicable for codeWiki type
|
|
34
|
+
* Default is '/'
|
|
35
|
+
*/
|
|
36
|
+
mappedPath?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Create a new wiki in Azure DevOps
|
|
40
|
+
*
|
|
41
|
+
* @param _connection The Azure DevOps WebApi connection (deprecated, kept for backward compatibility)
|
|
42
|
+
* @param options Options for creating a wiki
|
|
43
|
+
* @returns The created wiki
|
|
44
|
+
* @throws {AzureDevOpsValidationError} When required parameters are missing
|
|
45
|
+
* @throws {AzureDevOpsResourceNotFoundError} When the project or repository is not found
|
|
46
|
+
* @throws {AzureDevOpsPermissionError} When the user does not have permission to create a wiki
|
|
47
|
+
* @throws {AzureDevOpsError} When an error occurs while creating the wiki
|
|
48
|
+
*/
|
|
49
|
+
export declare function createWiki(_connection: WebApi, options: CreateWikiOptions): Promise<any>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { AzureDevOpsError, AzureDevOpsValidationError, } from '../../../shared/errors';
|
|
2
|
+
import { WikiType } from './schema';
|
|
3
|
+
import { getWikiClient } from '../../../clients/azure-devops';
|
|
4
|
+
/**
|
|
5
|
+
* Create a new wiki in Azure DevOps
|
|
6
|
+
*
|
|
7
|
+
* @param _connection The Azure DevOps WebApi connection (deprecated, kept for backward compatibility)
|
|
8
|
+
* @param options Options for creating a wiki
|
|
9
|
+
* @returns The created wiki
|
|
10
|
+
* @throws {AzureDevOpsValidationError} When required parameters are missing
|
|
11
|
+
* @throws {AzureDevOpsResourceNotFoundError} When the project or repository is not found
|
|
12
|
+
* @throws {AzureDevOpsPermissionError} When the user does not have permission to create a wiki
|
|
13
|
+
* @throws {AzureDevOpsError} When an error occurs while creating the wiki
|
|
14
|
+
*/
|
|
15
|
+
export async function createWiki(_connection, options) {
|
|
16
|
+
try {
|
|
17
|
+
const { name, projectId, type = WikiType.ProjectWiki, repositoryId, mappedPath = '/', } = options;
|
|
18
|
+
// Validate repository ID for code wiki
|
|
19
|
+
if (type === WikiType.CodeWiki && !repositoryId) {
|
|
20
|
+
throw new AzureDevOpsValidationError('Repository ID is required for code wikis');
|
|
21
|
+
}
|
|
22
|
+
// Get the Wiki client
|
|
23
|
+
const wikiClient = await getWikiClient({
|
|
24
|
+
organizationId: options.organizationId,
|
|
25
|
+
projectId,
|
|
26
|
+
});
|
|
27
|
+
// Prepare the wiki creation parameters
|
|
28
|
+
const wikiCreateParams = {
|
|
29
|
+
name,
|
|
30
|
+
projectId: projectId,
|
|
31
|
+
type,
|
|
32
|
+
...(type === WikiType.CodeWiki && {
|
|
33
|
+
repositoryId,
|
|
34
|
+
mappedPath,
|
|
35
|
+
version: {
|
|
36
|
+
version: 'main',
|
|
37
|
+
versionType: 'branch',
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
// Create the wiki
|
|
42
|
+
return await wikiClient.createWiki(projectId, wikiCreateParams);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
// Just rethrow if it's already one of our error types
|
|
46
|
+
if (error instanceof AzureDevOpsError) {
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
// Otherwise wrap in AzureDevOpsError
|
|
50
|
+
throw new AzureDevOpsError(`Failed to create wiki: ${error instanceof Error ? error.message : String(error)}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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d,CAAC;QAED,qCAAqC;QACrC,MAAM,IAAI,gBAAgB,CACxB,0BAA0B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACnF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createWiki } from './feature';
|
|
2
|
+
import { WikiType } from './schema';
|
|
3
|
+
import { getTestConnection, shouldSkipIntegrationTest, } from '@/shared/test/test-helpers';
|
|
4
|
+
import { getWikis } from '../get-wikis/feature';
|
|
5
|
+
import { AzureDevOpsError } from '@/shared/errors';
|
|
6
|
+
const shouldSkip = shouldSkipIntegrationTest();
|
|
7
|
+
const describeOrSkip = shouldSkip ? describe.skip : describe;
|
|
8
|
+
describeOrSkip('createWiki (Integration)', () => {
|
|
9
|
+
let connection;
|
|
10
|
+
let projectName;
|
|
11
|
+
beforeAll(async () => {
|
|
12
|
+
const testConnection = await getTestConnection();
|
|
13
|
+
if (!testConnection) {
|
|
14
|
+
throw new Error('Connection should be available when integration tests are enabled');
|
|
15
|
+
}
|
|
16
|
+
connection = testConnection;
|
|
17
|
+
projectName = process.env.AZURE_DEVOPS_DEFAULT_PROJECT || '';
|
|
18
|
+
if (!projectName) {
|
|
19
|
+
throw new Error('AZURE_DEVOPS_DEFAULT_PROJECT must be set for this test');
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
test('should create a project wiki or report that it already exists', async () => {
|
|
23
|
+
const existing = await getWikis(connection, { projectId: projectName });
|
|
24
|
+
const expectedProjectWikiName = `${projectName}.wiki`;
|
|
25
|
+
const hasProjectWiki = existing.some((w) => w.name === expectedProjectWikiName);
|
|
26
|
+
const options = {
|
|
27
|
+
name: `${projectName}.wiki`,
|
|
28
|
+
projectId: projectName,
|
|
29
|
+
type: WikiType.ProjectWiki,
|
|
30
|
+
};
|
|
31
|
+
if (hasProjectWiki) {
|
|
32
|
+
await expect(createWiki(connection, options)).rejects.toThrow(AzureDevOpsError);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
const wiki = await createWiki(connection, options);
|
|
36
|
+
expect(wiki).toBeDefined();
|
|
37
|
+
expect(wiki.projectId).toBeDefined();
|
|
38
|
+
expect(String(wiki.type)).toBe('projectWiki');
|
|
39
|
+
}
|
|
40
|
+
}, 60000);
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=feature.spec.int.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.spec.int.js","sourceRoot":"","sources":["../../../../src/features/wikis/create-wiki/feature.spec.int.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,UAAU,GAAG,yBAAyB,EAAE,CAAC;AAC/C,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;AAE7D,cAAc,CAAC,0BAA0B,EAAE,GAAG,EAAE;IAC9C,IAAI,UAAkB,CAAC;IACvB,IAAI,WAAmB,CAAC;IAExB,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAAM,cAAc,GAAG,MAAM,iBAAiB,EAAE,CAAC;QACjD,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;QACJ,CAAC;QACD,UAAU,GAAG,cAAc,CAAC;QAE5B,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,4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